Expected End of Line Error

Results 1 to 2 of 2

Thread: Expected End of Line Error

  1. #1
    Join Date
    Dec 1969

    Default Expected End of Line Error

    Here&#039;s my code:<BR>&#060;%<BR>&#060;!--<BR> // Connect to the Database<BR> DIM Conn, dbPath<BR> dbPath = Server.MapPath("DatabaseTest.mdb")<BR> Set Conn = Server.CreateObject("ADODB.Connection")<BR> Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath<BR> <BR><BR> // Set the SQL Statement<BR> Dim strSQL<BR> strSQL = INSERT INTO Names(FirstName) VALUES("Will")<BR> <BR> // Open the Recordset<BR> Conn.Execute(strSQL)<BR> <BR> //Close the Connection to the Database<BR> Conn.Close <BR> Set Conn = Nothing<BR> --&#062;<BR>%&#062;<BR>The only problem is that I&#039;m getting an expected end of statement error on the SQL statement. I don&#039;t have a clue why...<BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default It is a string you create

    strSQL = "INSERT INTO Names(FirstName) VALUES(&#039;Will&#039;)"<BR><BR>conn.execute strSQL,,128<BR><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