Birthday date problems
-
hiii this will definately work just change ur str2 to belove str2 = "select * from Birthday 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()
Jintal Patel
-
matjame wrote:
Syntax error (missing operator) in query expression 'BirthDate LIKE '*/09/20' 2007/11/13'. comx = New OleDbCommand("Select * from Bithdays where BirthDate LIKE '*/09/20' " & Date.Today, conx) comx.Connection = conx 'enure that the command follows the rite connection If conx.State = ConnectionState.Open Then conx.Close() End If conx.Open() Dim datar As OleDbDataReader = comx.ExecuteReader Error appears on the above statement
Hi, What are you doing here ???????? write query as below...
Select * from Bithdays where BirthDate LIKE '*/" + DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() "'"
Thanks, Sun Rays
Howzit Sun Rays. Here is how the problem was solved. 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() Thanx a million for your assistance
kagiso
-
You have no idea how much this means to me.It works like a charm. I wud buy you lunch, but ur there.Thanx a million. Damn, thank you very much.
kagiso
welcome
Jintal Patel