recordset problem?????????????

Results 1 to 2 of 2

Thread: recordset problem?????????????

  1. #1
    J.J. Guest

    Default recordset problem?????????????

    I need to insert a record into 2 different tables. The insert in the first one works fine, but the second one apparently doens&#039;t see the value needed. I&#039;m trying to use the same request in both inserts can I do this???<BR><BR>First insert I have a field FEIN and call it by<BR><BR>sql=sql & "," & "&#039;" & request ("Fein") & "&#039;" <BR><BR>then I need to use it again in another insert<BR><BR>sql3= "INSERT INTO Registration(Registration_Number, Business_Id, Registration_Status ) "<BR><BR>sql3=sql3 & "Values(" <BR>sql3=sql3 & "&#039;" & request ("Fein") & "&#039;"<BR>sql=sql & "," & rs2("fred")<BR>sql3=sql3 & "," & "&#039;" & request ("Registration_Status") & "&#039;"<BR>sql3=sql3 & ")" <BR> <BR>Why can&#039;t I do this?? I keep getting --Insert value list does not match column list: Wrong number of values for INSERT <BR>and I know it comes from the FEIN request. Thanks for any suggestions.

  2. #2
    Join Date
    Dec 1969


    After you construct the full sql3 string, RESPONSE.WRITE it so you can see what you are passing to the DB as the query.<BR><BR>I *suspect* that you are getting a NULL value for RS2("fred") and that it is actually the source of you problems.<BR><BR>But if you don&#039;t learn to DEBUG (and that means Response.Write in ASP coding, most of the time), then you can&#039;t find problems like this.<BR><BR>Hokay? Good luck.<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