Jump to content


Check out our Community Blogs

MastaKay

Member Since 14 Nov 2007
Offline Last Active Nov 20 2007 03:25 AM
-----

Posts I've Made

In Topic: Birthday date problems

14 November 2007 - 03:10 AM

Its sorted guys.
Here is the solution.
Imports System.Data
Imports System.Web.UI.Control
Imports System.Web.UI.WebControls.WebControl
Imports System.Web.UI.WebControls.LinkButton
Imports System.Data.oledb
Imports Microsoft.VisualBasic.ApplicationServices
Imports Microsoft.VisualBasic.OpenShare
Partial Class Birthdays
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cm As New OleDbCommand
Dim con As New OleDbConnection
4.0; data source = C:\Documents and Settings\kagisho.mashiloane\My Documents\Visual Studio 2005\Projects\Search AL\TelephoneList.mdb")
'conx.Open()
Dim str1 As String = "Provider = Microsoft.Jet.oledb.4.0; Data source =C:\Documents and Settings\kagisho.mashiloane\My Documents\Visual Studio 2005\Projects\Search AL\TelephoneList.mdb"
Dim str2 As String

con = New OleDbConnection(str1)
con.Open()
str2 = "select * from Bithdays WHERE (DATEPART('m', BDate)) = '" & Date.Today.Month & "' And (DATEPART('d', BDate)) = '" & Date.Today.Day & "'"
cm = New OleDbCommand(str2, con)
GridView1.DataSource = cm.ExecuteReader(CommandBehavior.CloseConnection)
GridView1.DataBind()

If con.State = ConnectionState.Open Then
con.Close()
End If






End Sub

In Topic: Birthday date problems

14 November 2007 - 02:01 AM

Its actually asp.net but the code is the same.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download