Queuekstealia
New Member
Okay I am now frustrated. I have written ADO code before that updates and add new records to a SQL table, now I am trying to do it with Access and it is blowing up on my rs.update command.<BR>I have used response.write to test and it is reading from the table fine. I have tried adOpenStatic,AdOpenKeyset and adLockPessimistic,adLockOptimistic and no success.<BR><BR>Does anyone know what I am doing wrong? I have read my old code, the ASPFAQs and MSDN and I can't figure it out...Help!!!!<BR><BR>Jose<BR><BR>below is my code...<BR><%@ Language=VBScript %><BR><!-- #INCLUDE FILE="adovbs.inc" --><BR><BR><BR><%<BR> Add_to_Database()<BR><BR> public sub Add_to_Database()<BR> <BR> dim rs <BR> dim strConnection<BR> dim qryReunion<BR> <BR> set rs = server.CreateObject("ADODB.Recordset")<BR> <BR> qryReunion = "Select FirstName, LastName, Street, City, State, ZipCode, Email from MAIL"<BR> strConnection = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("adelacas
eunion.mdb")<BR> <BR> rs.CursorLocation = AdUseClient <BR> rs.Open qryReunion, strConnection, adOpenStatic, adLockPessimistic<BR> <BR> rs.AddNew<BR> rs.Fields("FirstName") = "Testjjj"<BR> <BR> rs.Update<BR> rs.Close<BR> set rs = nothing<BR><BR> Response.Write rs("FirstName")<BR> end sub<BR><BR>%>try to replace the cursor location make it server side
eunion.mdb")<BR> <BR> rs.CursorLocation = AdUseClient <BR> rs.Open qryReunion, strConnection, adOpenStatic, adLockPessimistic<BR> <BR> rs.AddNew<BR> rs.Fields("FirstName") = "Testjjj"<BR> <BR> rs.Update<BR> rs.Close<BR> set rs = nothing<BR><BR> Response.Write rs("FirstName")<BR> end sub<BR><BR>%>try to replace the cursor location make it server side