After adding a new record using the ADO recordset, I cannot get the id (autonumbered in access2000 database) to return a value. I have looked through code snippets and it seems to work for them. If anyone knows of any issues concerning this, or an alternate way to accomplish this, it would be appreciated.
Here is the code:
---------------------------------------------
<%
Dim conn
Dim sql
set conn = Server.CreateObject("ADODB.Connection"
conn.open "ttek","",""
set session("ttek_conn" = conn
sql = "SELECT * FROM [RMA] WHERE [ID]=0"
set rs = Server.CreateObject("ADODB.Recordset"
rs.Open sql,conn,3,3
rs.AddNew
rs("rma#" = CStr(1234)
rs.Update
Response.write("Not Working Still" & rs.Fields("id".value)
rs.Close
set rs=Nothing
%>
Here is the code:
---------------------------------------------
<%
Dim conn
Dim sql
set conn = Server.CreateObject("ADODB.Connection"
conn.open "ttek","",""
set session("ttek_conn" = conn
sql = "SELECT * FROM [RMA] WHERE [ID]=0"
set rs = Server.CreateObject("ADODB.Recordset"
rs.Open sql,conn,3,3
rs.AddNew
rs("rma#" = CStr(1234)
rs.Update
Response.write("Not Working Still" & rs.Fields("id".value)
rs.Close
set rs=Nothing
%>