Error using the AddNew/Update Method

Results 1 to 3 of 3

Thread: Error using the AddNew/Update Method

  1. #1
    Steve B Guest

    Default Error using the AddNew/Update Method

    In the following code I am getting an error message "Syntax error in INSERT INTO statement" at the line rsmembers.Update. I can&#039;t figure out what&#039;s wrong. Any help would be really appreciated. Thanks.<BR><BR>&#060;%<BR>Dim objCommand, rsmembers, SQL, membersConnection<BR>Dim userid, password, email<BR>Dim teamnum, alnl, cat, salarycap<BR><BR>Set membersConnection=Server.CreateObject("ADODB.Conne ction")<BR>membersConnection.Open "DSN=baseball"<BR><BR>userid = Request.Form("userid")<BR>password = Request.Form("password")<BR>email = Request.Form("email")<BR>teamnum = Request.Form("teamnum")<BR>alnl = Request.Form("alnl")<BR>cat = Request.Form("cat")<BR>salarycap = Request.Form("salarycap")<BR><BR>Set rsmembers = Server.CreateObject("ADODB.Recordset")<BR>rsmember s.Open "members", membersConnection, adOpenForwardOnly, adLockOptimistic, adCmdTable<BR><BR> rsmembers.AddNew<BR> rsmembers("userid") = userid<BR> rsmembers("password") = password<BR> rsmembers("email") = email<BR> rsmembers("teamnum") = teamnum<BR> rsmembers("alnl") = alnl<BR> rsmembers("cat") = cat<BR> rsmembers("salarycap") = salarycap<BR> rsmembers.Update<BR> <BR> rsmembers.Close<BR> Set rsmembers = Nothing<BR> <BR> membersConnection.Close<BR> Set membersConnection = Nothing<BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default I dont see the Insert Into statement.. there any other sql query in your code?

  3. #3
    NPKumar Guest

    Default RE: Error using the AddNew/Update Method

    change the "members",membersConnection,0,2,adcmdtable to<BR> "members",membersconnection,2,3,adcmdtable.<BR><BR ><BR>It will solve your problem.

Posting Permissions

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