Results 1 to 5 of 5

Thread: SQL Syntax error! Help!!!!

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    Take a look at my code. THis is the error the browser gives me:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    /ReclaimAmerica.org/test.asp, line 87

    Line 87 is flagged with a +++

    What is the problem?


    sSQL = "INSERT INTO Register(FirstName, LastName, email, userID, address, state, zipcode, phone " & _
    "password, userLevel) VALUES ('" & strFirstName & _
    "','" & strLastName & "','" & strEmail & "','" & strUserID & "','" & strAddress & "','" & strState & "','" & strZipCode & "','" & strPhone & "','" & strPassword & "',1)"
    +++Dconn.Execute sSQL
    Dconn.Close
    Set Dconn = Nothing

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Unhappy

    Come on someone please take a look

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    CAN ANYBODY HELP ME I'M FALLING!!!

  4. #4
    Member
    Join Date
    Feb 2001
    Location
    Greensboro, NC.
    Posts
    40
    It might be the missing comma. See *

    sSQL = "INSERT INTO Register(FirstName, LastName, email, userID, address, state, zipcode, phone *" & _
    "password, userLevel)

    Cheers

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    Thank you so very much for the help!

    That is all it took!

    THanks again...these forums are the best....

Posting Permissions

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



Click Here to Expand Forum to Full Width