Help, Syntax Error!

Results 1 to 7 of 7

Thread: Help, Syntax Error!

  1. #1
    Young Guest

    Default Help, Syntax Error!

    Basically what I am doing is that when the user checks off the check box, then it will update table called &#039conxion&#039 where RefreshByName matches. However, when I submit the page and go to next page where following code generates, I get this error msg: <BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)<BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.<BR>/myasp/strikeasp/checkOffB.asp, line 24<BR><BR><BR>Browser Type:<BR>Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) <BR><BR>Page:<BR>POST 38 bytes to /myasp/strikeasp/checkOffB.asp<BR><BR>POST Data:<BR>chkBox12=conxion2&SubmitChkList=Submit <BR><BR><BR>Here is my code:<BR>&#060;!-- #Include file="IncludesDB.INC" --&#062;<BR>&#060;%<BR> <BR> Dim objRec<BR> <BR> Set objRec = Server.CreateObject("ADODB.Recordset")<BR> <BR> <BR> strIT = Application.Value("g_Item") <BR> If Request.Form("chkBox11") &#060;&#062; "" Then<BR> strSQLConxion = "Update Conxion [Set Files copied to \wustage1] = &#039True&#039 WHERE RefreshByName =&#039" & strIT & "&#039"<BR> Else<BR> strSQLConxion = "Update Conxion [Set Files copied to \wustage1] = &#039False&#039 WHERE RefreshByName =&#039" & strIT & "&#039"<BR> End If<BR> Response.Write "ProcessConxion: " & strSQLConxion & "<BR>"<BR> <BR> &#039&#039&#039&#039&#039&#039&#039&#039&#039Th is is line 24&#039&#039&#039&#039&#039&#039&#039&#039&#039 <BR> objRec.Open strSQLConxion, strConnect, adOpenKeyset, adLockOptimistic, adCmdTable<BR><BR> &#039&#039&#039&#039&#039&#039&#039&#039&#039&#039 &#039&#039&#039&#039&#039&#039&#039&#039&#039&#039 &#039&#039&#039&#039&#039&#039&#039&#039&#039&#039 &#039&#039&#039&#039&#039&#039&#039&#039&#039&#039 &#039&#039 <BR> <BR> objRec.Close<BR> Set objRec = Nothing <BR>%&#062;<BR><BR>Here is DB.INC:<BR>&#060;%<BR> dim db<BR> strConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=c:inetpubwwwrootMyASPDataStrike.mdb" <BR>%&#062;<BR><BR>Please help me, I can&#039t get anywhere!<BR>Thanks...

  2. #2
    Shawn Clabough Guest

    Default RE: Help, Syntax Error!

    What does the response.write in line 23 output?

  3. #3
    Young Guest

    Default RE: Help, Syntax Error!

    ProcessConxion: Update Conxion [Set Files copied to \wustage1] = &#039True&#039 WHERE RefreshByName =&#039intel2&#039<BR>

  4. #4
    Young Guest

    Default RE: Help, Syntax Error!

    Is there anyone who can help me with this problem, please?


  5. #5
    Shawn Clabough Guest

    Default RE: Help, Syntax Error!

    I have not seen this syntax before:<BR><BR>"[Set Files copied to \wustage1]"<BR><BR>so I&#039m not sure if I can help. Usually in my Update statements the Set is outside the field name. Is there a field called [Set Files copied ot \wustage1]? What are you trying to set to true or false?<BR>

  6. #6
    Young Guest

    Default RE: Help, Syntax Error!

    My field names are just like that.... Since my field names are long with spaces, I put suare bracket around so when SQL executes, it doesn&#039t get confused. The reason why I want to set it true or false is that we check the list whenever we have site refresh, we keep track of our project. So that we make sure we finished our every single job should be done. Does it make sense to you? So is there syntax error with my SQL statement? Do I need to change my field name to work it out?

  7. #7
    Shawn Clabough Guest

    Default RE: Help, Syntax Error!

    I think you want something like:<BR><BR>strSQLConxion = "Update Conxion Set [Files copied to wustage1] = &#039True&#039 WHERE RefreshByName =&#039" & strIT & "&#039"<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
  •