Results 1 to 10 of 10

Thread: sSQL = "INSERT INTO..... Syntax Error

Hybrid View

  1. #1
    Join Date
    Jan 2003
    Posts
    5
    Yes about that date thing i have set it to text as i thought that could be what was going wrong... BUT it still goes wrong

    Any more ideas??

    Thanks for your help...

  2. #2
    Join Date
    Oct 2005
    Posts
    6
    try this:

    instead of using the regular connection varbiable:

    dbPath = Server.MapPath("datasource.mdb")
    dbConnection.Provider = "Microsoft.Jet.OLEDB.4.0"
    dbConnection.Open dbPath


    you can use one of the following:

    1. dbPath = Server.MapPath("datasource.mdb")
    dbConnection.Provider = "Microsoft Access Driver (*.mdb)"
    dbConnection.Open dbPath

    2. dbPath = Server.MapPath("datasource.mdb")
    dbConnection.ConnectionString= "Driver={Microsoft Access Driver (*.mdb)};DSN=;DBQ=" & dbPath
    dbConnection.Open

  3. #3
    Join Date
    Oct 2002
    Posts
    933
    Do a debug dump of the SQL. Cut and paste the statement and go to the DB query or enterprise manager and execute the statement. All the missing quotes and invalid syntax will show.

    Fk

Posting Permissions

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