Hi,
i had just now convert my access database to SQL database,
My question:
in my database there is table cold: (tblnames), and it's include two columns (id_name) and (name), and the DATA TYPE of the column (id_name) is (AutoNumber)
with access database when i want to add new row in it, i have to write the following code:
Set rsCategory = Server.CreateObject("ADODB.Recordset")
rsCategory.LockType = 3
strSQL = "select * from tblnames;"
if not rsCategory.EOF then
rsCategory.addnew
rsCategory("name") = STRING
rsCategory.update
the access database will add STRING in the column: (name), and automatically will insert new number in column(id_name)
but when i have now to add new row in SQL database with same code, it give me this error:
Microsoft OLE DB Provider for SQL Server error '80040e2f'
Cannot insert the value NULL into column 'Thread_ID', table 'noor.noorsa.tblThread'; column does not allow nulls. INSERT fails
it's mean that you must insert new number in cloumn (id_name) !!
and you know that the DATA TYPE of (id_name) column is: AutoNumber.
so, what is the problem and what i must do plzz ??!! 