Results 1 to 2 of 2

Thread: INSERT INTO problem

  1. #1
    Join Date
    Dec 1969

    Default INSERT INTO problem

    I get the word KeywordText inserted into my database instead of its value what is the correct syntax to rectify this? I have tried various alternatives but just can&#039;t get the value, if I try it without the brackets I get the following error : -<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. <BR><BR>/updateAdd.asp, line 18 <BR><BR>Here is my code<BR><BR>&#060;% Language = VBScript %&#062;<BR>&#060;%<BR><BR> &#039; Declare variables<BR> Dim KeywordText<BR> Dim SQLINSERT<BR> Dim connupdate<BR> Dim URL<BR> <BR> &#039; Grab variables from the querystring <BR> KeywordText=Request.Querystring("newkeyword")<BR> <BR> &#039; Create the INSERT statement for a brand new keyword<BR> SQLINSERT="INSERT INTO Keywords (KeywordText) VALUES (&#039;KeywordText&#039;)"<BR> <BR> set connupdate = server.createobject("ADODB.Connection")<BR> "SCR"<BR> connupdate.execute(SQLINSERT)<BR> <BR> &#039; Send the user back to the page<BR> URL="Add_scr.asp"<BR> Response.redirect (URL)<BR> <BR>%&#062;<BR><BR>Thankyou in advance

  2. #2
    Join Date
    Dec 1969

    Default RE: INSERT INTO problem

    &#039; Create the INSERT statement for a brand new keyword<BR>SQLINSERT="INSERT INTO Keywords (KeywordText) VALUES (&#039;" & KeywordText & "&#039;)"<BR><BR>Jason<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