Last post Jul 26, 2009 12:34 AM by rvega75
Jul 23, 2009 07:07 AM|africano|LINK
i tried to insert my own data and i connect it to the SQL, when i do try to insert data it gives me this error, also i change in the database this default value to (getutcdate()) and still have the same error.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Jul 23, 2009 11:01 AM|rvega75|LINK
Please elaborate in your situation. What type of connectiona are you using? are you Using LINQ? SQLDataAdapters? or a SQLCommand whith the insert SQL Statement itself?
This sounds like you're not using the correct datatype, sql server supports 'datetime', the datetime type of .NET maps perfectly to this.
Alos if you're setting a default value in SQL server, try removing this particular field from the insert statemnt used in the .NET application that you're building.
Jul 23, 2009 11:08 AM|basheerkal|LINK
Try to find any occurance of type= 'Data" or Type="Date) in your html code and replace it "Date" with DateTime.
Jul 23, 2009 07:18 PM|africano|LINK
Thank you very much it works with me but it shows me another error with the ID can't be NULL so how can i make it Autonumbering ?
and by the way i am using the sql statement with sql database 2005
Jul 24, 2009 09:18 PM|basheerkal|LINK
to creat an AutoNumber field in sql2005 please refer this link
Jul 26, 2009 12:34 AM|rvega75|LINK
for that in the properties of the SQL studio manager, you have to set in the properties for that id particula colum, set Identity to "yes", and that's all it takes to make auntonumber, just make sure that the datatype for the this id column is int, if it
isn't int, the Identity property won't even show.