K
Kwok
Hi,
I search some record(s) according to specific date which
is took from datetimepicker, but a dataset.table(tbname).count
is zero.
here is my code. I use ODBC.net and Option strict On
dim seaSql as string
seaSql = "Select * from Orders where JobDate = @tmpJdate "
DBCom.CommandText = seaSql
DBCom.CommandType = CommandType.Text
DBCom.Parameters.Add("@tmpJDate", OdbcType.Date)
DBCom.Parameters("@tmpJDate").Value = seaJobDate.Value.Year.ToString & "-"
& _
seaJobDate.Value.Month.ToString & "-" & seaJobDate.Value.Day.ToString)
'because mySQL date Vale = YYYY-MM-DD
DBAdapter.SelectCommand = DBCom
DBAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
DBAdapter.Fill(seaJobSet, "Orders")
IS the code got any mistake??
I try the date value is "'" & "2003-9-15" & "'" or
"2003-9-15", but it also cant work.
Thanks
KWOK
I search some record(s) according to specific date which
is took from datetimepicker, but a dataset.table(tbname).count
is zero.
here is my code. I use ODBC.net and Option strict On
dim seaSql as string
seaSql = "Select * from Orders where JobDate = @tmpJdate "
DBCom.CommandText = seaSql
DBCom.CommandType = CommandType.Text
DBCom.Parameters.Add("@tmpJDate", OdbcType.Date)
DBCom.Parameters("@tmpJDate").Value = seaJobDate.Value.Year.ToString & "-"
& _
seaJobDate.Value.Month.ToString & "-" & seaJobDate.Value.Day.ToString)
'because mySQL date Vale = YYYY-MM-DD
DBAdapter.SelectCommand = DBCom
DBAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
DBAdapter.Fill(seaJobSet, "Orders")
IS the code got any mistake??
I try the date value is "'" & "2003-9-15" & "'" or
"2003-9-15", but it also cant work.
Thanks
KWOK