A
Arpan
A SQL Server 2005 DB table has 4 columns namely "ID" (IDENTITY int
column), "FirstName" (varchar(50)), "LastName" (varchar(50)) & "DOB"
(datetime). Now when I am trying to add a new row using the following
INSERT statement:
sqlDapter.InsertCommand = New SqlCommand
sqlDapter.InsertCommand.CommandText = "INSERT INTO UserDetailss
VALUES('bobby','simpson','" & Now() & "')"
sqlDapter.InsertCommand.Connection = sqlConn
sqlDapter.Update(dSet, "UserDetails")
'Response.Write("INSERT INTO UserDetailss VALUES('bobby','simpson','" &
Now() & "')"
the following error gets generated pointing to the Update line:
The conversion of a char data type to a datetime data type resulted in
an out-of-range datetime value.
I even tried using the different DateTime Format functions but none of
them work. WHere am I going wrong?
Thanks
Arpan
column), "FirstName" (varchar(50)), "LastName" (varchar(50)) & "DOB"
(datetime). Now when I am trying to add a new row using the following
INSERT statement:
sqlDapter.InsertCommand = New SqlCommand
sqlDapter.InsertCommand.CommandText = "INSERT INTO UserDetailss
VALUES('bobby','simpson','" & Now() & "')"
sqlDapter.InsertCommand.Connection = sqlConn
sqlDapter.Update(dSet, "UserDetails")
'Response.Write("INSERT INTO UserDetailss VALUES('bobby','simpson','" &
Now() & "')"
the following error gets generated pointing to the Update line:
The conversion of a char data type to a datetime data type resulted in
an out-of-range datetime value.
I even tried using the different DateTime Format functions but none of
them work. WHere am I going wrong?
Thanks
Arpan