N
Newbie
howdy...
i am trying to execute a statement where i insert a record with datetime
values into a sql database.
Dim sqlcmd As New SqlCommand
sqlcmd.CommandText = "update tbl_event set last_run = '" &
nowTime & "', event_action =1, event_time = '" & nextPollTime & "' where
event_id = " & IntEventID
Debug.Print(sqlcmd.CommandText)
sqlcmd.Connection = dbConnectionIn
sqlcmd.CommandType = CommandType.Text
sqlcmd.ExecuteNonQuery()
the commandtext equals
update tbl_event set last_run = '15/07/2008 13:07:27', event_action =1,
event_time = '15/07/2008 13:07:42' where event_id = 1
I get the following error....
The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value.
Whats wrong with what I am doing ????
Thanks for your help
i am trying to execute a statement where i insert a record with datetime
values into a sql database.
Dim sqlcmd As New SqlCommand
sqlcmd.CommandText = "update tbl_event set last_run = '" &
nowTime & "', event_action =1, event_time = '" & nextPollTime & "' where
event_id = " & IntEventID
Debug.Print(sqlcmd.CommandText)
sqlcmd.Connection = dbConnectionIn
sqlcmd.CommandType = CommandType.Text
sqlcmd.ExecuteNonQuery()
the commandtext equals
update tbl_event set last_run = '15/07/2008 13:07:27', event_action =1,
event_time = '15/07/2008 13:07:42' where event_id = 1
I get the following error....
The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value.
Whats wrong with what I am doing ????
Thanks for your help