Syntax error

Results 1 to 2 of 2

Thread: Syntax error

  1. #1
    Michael Yakubovsky Guest

    Default Syntax error

    INSERT INTO news_new (DateID, cur_date, text) VALUES (45, cur_date=#11/11/11#, text=&#039 11/11/11&#039)<BR><BR>DateID - Number<BR>cur_date - Date/Time<BR>text - Memo<BR><BR>The above statement give the fallowing error when Iam trying<BR>to insert Access data base. How can I avoid this?<BR>Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

  2. #2
    Join Date
    Dec 1969

    Default RE: Syntax error

    Try this Micheal<BR><BR>strSQL="INSERT INTO News_new (DateID, cur_date, text) VALUES(&#039" & DateID & "&#039,&#039" & cur_date & "&#039,&#039" & text & "&#039)"<BR><BR>Cn.execute strSQL<BR><BR>The values for these fields you must get from the form.<BR><BR>DateID = reguest.querystring("the fieldname in the form")<BR>Cur_date = reguest.querystring("the fieldname in the form")<BR>Text = reguest.querystring("the fieldname in the form")<BR><BR>Providing that the info in the form must be action="get". If it is mathod="post" then you must change the request.querystring to request.form<BR><BR>Hope this works.<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