Error Updating a Recordset

Results 1 to 2 of 2

Thread: Error Updating a Recordset

  1. #1
    Join Date
    Dec 1969

    Default Error Updating a Recordset

    I am new to asp and am attempting to learn how to update recordsets that are in an MS Access database. I can do it using SQL statments, but I know it is more effiecient to do it using the Recordset Methods. The following is my asp code to do this. F&PO is the DSN entry and tblTest is the table the records are in:<BR><BR>&#060;%<BR> Dim objConn<BR> Set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.ConnectionString = "DSN=F&PO"<BR> objConn.Open<BR> <BR>Dim objRS<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR> "tblTest", "F&PO", adOpenKeyset<BR> objRS.AddNew<BR> objRS.Fields("Name")="John"<BR> objRS.Fields("Color")="Black"<BR> objRS.Update<BR> objRS.close<BR> <BR> objConn.close<BR>%&#062;<BR><BR>The error message I get when calling the asp is:<BR><BR> ADODB.Recordset error &#039 800a0cb3&#039 <BR><BR> The operation requested by the application is not supported by the provider. <BR><BR> FILENAME.asp, line 14 <BR><BR>When I add adCmdTable to the end of the line I get the following error:<BR><BR> ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR> The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR><BR> FILENAME.asp, line 13 <BR><BR>Am I doing anything wrong? Does MA Access not support the Recordset Method AddNew? Any help is appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Error Updating a Recordset

    &#062;I can do it using SQL statments, but I know it is more <BR>&#062;effiecient to do it using the Recordset Methods.<BR><BR>I Don&#039t think that is true , I believe it is more efficient to use an SQL statement ...<BR><BR>&#062; "tblTest", "F&PO", adOpenKeyset<BR>I believe this line s/b:<BR><BR> "tblTest", objConn, adOpenKeyset<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts