Results 1 to 3 of 3

Thread: Syntax error in UPDATE statement

  1. #1
    Michael Guest

    Syntax error in UPDATE statement

    For some reason I am getting this error. I have looked over the SQL code but see nothing wrong. As I am new to this I might be missing something. Can someone help? BTW sorry for so much code!!

    < ERROR >

    Error # = 80040E14
    Description = [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = 37000
    NativeError = -3503


    < CODE >
    <%
    Set Admin=Server.CreateObject(&#34;ASPdb.Pro&#34
    Admin.dbmdb=&#34;D:Websvolzcpadatavolzcpa.mdb&#34;
    Admin.DBColor = &#34;10,auto,lightblue&#34;
    Admin.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    Admin.dbDebug=True
    Admin.DbMode = &#34;Dual&#34;
    F = Request(&#34;TableID&#34
    If F <> &#34;&#34; then
    Admin.dbReset(1)
    Session(&#34;FR&#34 = F
    End If
    If F = &#34;games&#34; then
    Admin.dbMemoTextSize=0
    else
    Admin.dbMemoTextSize=40
    End If
    Admin.dbSQL = &#34;Select * from &#34; & Session(&#34;FR&#34 & &#34;&#34;
    Admin.dbImageDir=&#34;images/&#34;
    Admin.dbGridInc=10
    Admin.dbNavigation=&#34;bottom&#34;
    Admin.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color, filter, download, add, update, edit, delete&#34;
    Admin.dbNavigationIcon=&#34;std&#34;
    Admin.dbUnit = 1
    Admin.dbEditHideFlds=&#34;ID&#34;

    Admin.dbFilterHideFlds=&#34;ID&#34;
    Admin.dbFormHideFlds=&#34;ID&#34;

    Admin.dbEditParams=&#34;TableName=&#34; & Session(&#34;FR&#34 & &#34;,BookMarkFlds=0,InputSize=7x70,TableTag=BORDE R=2&#34;

    Admin.aspDBPro

    %>


    < SQL STATEMENT >
    Platform
    Detected, allowed CPU=4/2
    GridInc before QP=10
    DBType=ACCESS
    Main: Q=..U=..V=..W=..UE=Update Current Record..US=
    Querystring, Form=/Cat=EXE&Title=Pennypincher&Link=pennyp25.exe&Desc= Pennypincher+is+a+program+that+helps+you+manage+yo ur+money+by+providing+an+easy+and+convenient+forma t+for+tracking+all+money+earned+and+spent.+Keep+tr ack+of+your+cash+flow+and+categorize+spending+on+g roceries%2C+entertainment%2C+gas%2C+rent%2C+laundr y%2C+bills%2C+donations%2C+and+car+payments.+Penny pincher+also+includes+charts+that+calculate+percen tages+of+money+earned+and+spent+in+different+categ ories.+Best+of+all+Pennypincher+is+completely+free %21&Size=2.4MB&aspDBEditBut_1=Update+Current+Recor d
    Connection=driver={Microsoft Access Driver (*.mdb)}; dbq=D:Websvolzcpadatavolzcpa.mdb
    Get Connection:Alive, CloseConn, NewSession=True/True/False
    Get_Connection: New connection, Tout: driver={Microsoft Access Driver (*.mdb)}; dbq=D:Websvolzcpadatavolzcpa.mdb/30
    Edit Action=Update Current Record
    Entering edit: Update Current Record
    Begin edit - Update Current Record
    f1=, Cat = &#39;*CatUPDATE&#39;, Title = &#39;*TitleUPDATE&#39;, Link = &#39;*LinkUPDATE&#39;, Desc = &#39;*DescUPDATE&#39;, Size = &#39;*SizeUPDATE&#39;,
    Update Arg=Cat
    Update Field Value=EXE
    F1 Replace ELSE = , Cat = &#39;EXE&#39;, Title = &#39;*TitleUPDATE&#39;, Link = &#39;*LinkUPDATE&#39;, Desc = &#39;*DescUPDATE&#39;, Size = &#39;*SizeUPDATE&#39;,
    Update Arg=Desc
    Update Field Value=Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!
    F1 Replace ELSE = , Cat = &#39;EXE&#39;, Title = &#39;*TitleUPDATE&#39;, Link = &#39;*LinkUPDATE&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;*SizeUPDATE&#39;,
    Update Arg=aspDBEditBut_1
    Update Arg=Title
    Update Field Value=Pennypincher
    F1 Replace ELSE = , Cat = &#39;EXE&#39;, Title = &#39;Pennypincher&#39;, Link = &#39;*LinkUPDATE&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;*SizeUPDATE&#39;,
    Update Arg=Link
    Update Field Value=pennyp25.exe
    F1 Replace ELSE = , Cat = &#39;EXE&#39;, Title = &#39;Pennypincher&#39;, Link = &#39;pennyp25.exe&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;*SizeUPDATE&#39;,
    Update Arg=Size
    Update Field Value=2.4MB
    F1 Replace ELSE = , Cat = &#39;EXE&#39;, Title = &#39;Pennypincher&#39;, Link = &#39;pennyp25.exe&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;2.4MB&#39;,
    Edit SQL=UPDATE downloads SET Cat = &#39;EXE&#39;, Title = &#39;Pennypincher&#39;, Link = &#39;pennyp25.exe&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;2.4MB&#39; WHERE ID = 9

  2. #2
    Mark Guest

    Syntax error in UPDATE statement (reply)

    Michael, you have a mistake in your code.
    The line that says:
    If F = &#34;games&#34;
    Should say:
    If F = Session(&#34;FR&#34

    Then try this:
    Paste your Update SQL into Access (in a QUERY) and try to let Access run it. Let&#39;s see what Access says about it. (I assume you have a table name called [downloads] ? ) AHA!!! DESC is a RESERVED WORD!! You must rename that field. See list of reserved Words at:
    http://www.aspdb.com/docs/aspdbman.htm#TOC_IVB


    Edit SQL=

    UPDATE downloads SET Cat = &#39;EXE&#39;, Title = &#39;Pennypincher&#39;, Link = &#39;pennyp25.exe&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;2.4MB&#39; WHERE ID = 9


  3. #3
    Michael Guest

    Syntax error in UPDATE statement (reply)

    Many thanks and praises!


    ------------
    Mark at 9/18/00 3:33:45 PM

    Michael, you have a mistake in your code.
    The line that says:
    If F = &#34;games&#34;
    Should say:
    If F = Session(&#34;FR&#34

    Then try this:
    Paste your Update SQL into Access (in a QUERY) and try to let Access run it. Let&#39;s see what Access says about it. (I assume you have a table name called [downloads] ? ) AHA!!! DESC is a RESERVED WORD!! You must rename that field. See list of reserved Words at:
    http://www.aspdb.com/docs/aspdbman.htm#TOC_IVB


    Edit SQL=

    UPDATE downloads SET Cat = &#39;EXE&#39;, Title = &#39;Pennypincher&#39;, Link = &#39;pennyp25.exe&#39;, Desc = &#39;Pennypincher is a program that helps you manage your money by providing an easy and convenient format for tracking all money earned and spent. Keep track of your cash flow and categorize spending on groceries, entertainment, gas, rent, laundry, bills, donations, and car payments. Pennypincher also includes charts that calculate percentages of money earned and spent in different categories. Best of all Pennypincher is completely free!&#39;, Size = &#39;2.4MB&#39; WHERE ID = 9


Posting Permissions

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