I still need help desperately. Help me?

Results 1 to 6 of 6

Thread: I still need help desperately. Help me?

  1. #1
    Raquel Anne Guest

    Default I still need help desperately. Help me?

    here is my update code:<BR><BR>sqry2 = "UPDATE customers (timelogout, totaltime, totalcharge) values(&#039" & mytime & "&#039, &#039" & totaltime & "&#039, &#039" & totalcharge & "&#039)" <BR>sqry2 = sqry2 & "WHERE logincc = &#039" & iln & "&#039, invoice = &#039" & iinvoice & "&#039"<BR><BR>set RS = conn.Execute (sqry2)<BR><BR>here is the error I get:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in UPDATE statement. <BR><BR>/Untitled-2b.asp, line 44 <BR><BR><BR>PLease, Please help if you can?<BR>thanks in advance!<BR>Raquel Anne<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    41

    Default RE: I still need help desperately. Help me?

    try taking the comma out of the WHERE portion of the sql statement. Us AND, OR or whatever you need.<BR>Also, you may want to look into buying a good asp book. I like "Professional Active Server Pages" from WROX.

  3. #3
    Stephan Zutterman Guest

    Default RE: I still need help desperately. Help me?

    I notice two errors in your SQL statement ...<BR><BR>1° before the WHERE there should be a space otherwise the full SQL statement would read ...)WHERE...<BR>2° the different where criterias have to be separated with AND or OR ... so it should be ...WHERE logincc = &#039" & iln & "&#039 AND invoice = &#039" & iinvoice & "&#039"

  4. #4
    Jason Miller Guest

    Default RE: I still need help desperately. Help me?

    update customers set timelogout = #" & mytime & "#, totaltime = #" & totaltime & "#, totalcharge = &#039" & totalcharge & "&#039 where logincc = &#039" & iln & "&#039, invoice = &#039" & iinvoice & "&#039;"<BR><BR>might work. See http://www.pbs.mcp.com/ebooks/0672311100/index.htm for more info (it&#039s a SQL book from Que)<BR><BR>


  5. #5
    Jason Buck Guest

    Default RE: I still need help desperately. Help me?

    I always write my statements on one line to make sure then split it up.<BR>Look below and see that you statement would be as follows:<BR><BR>)WHERE<BR>totalcharge & "&#039)" <BR>sqry2 = sqry2 & "WHERE <BR>should be & " WHERE <BR><BR>I think you missed a space<BR><BR>Try this for your update statement<BR><BR>mysql7 = "Update CLIENT SET cliname=&#039" & strcliname & "&#039, client.state=&#039" & strselstate & "&#039, client.husb_dob=&#039" & strhdob & "&#039, client.wife_dob=&#039" & strwdob & "&#039, client.resp_atty=&#039" & strselrespatty & "&#039, client.corp_fiduc=&#039" & strselcorpfid & "&#039, client.atty_fiduc=&#039" & strselattyfid & "&#039, client.huasset=&#039" & strselhuasset & "&#039, client.wiasset=&#039" & strselwiasset & "&#039, client.coasset=&#039" & strselcoasset & "&#039, client.memo=&#039" & strmemo & "&#039, client.origdate=&#039" & strorgdate & "&#039, client.moddate=&#039" & strmoddate & "&#039, client.modtime=&#039" & strmodtime & "&#039, client.modwho=&#039" & strmodwho & "&#039, client.office=&#039" & stroffloc & "&#039 Where climat=&#039" & strClimat & "&#039"<BR><BR>If you have anymore questions, feel free to contact me.<BR><BR>Respectfully,<BR><BR>Jason<BR>webmaster @wnj.com<BR>

  6. #6
    Raquel Anne Guest

    Default THANKS TO THE FOLLOWING, IT WORKS

    Thank-You to the following people in helping me so quickly!<BR>Faisal<BR>Stephan Zutterman<BR>Jason Miller<BR>Jason Buck<BR>Nathan Grass<BR><BR>These people should be given praise when you get a chance, their efforts and help combined solved my problem quicly!<BR>Again thanks to you all!<BR>I owe you!<BR>Raquel Anne<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
  •