3 Replies Latest reply on Jun 24, 2014 5:55 PM by ranja

    FM Pro 13 SQL Syntax error using ODBC connection via .NET

    AdamRobichaud

      Title

      FM Pro 13 SQL Syntax error using ODBC connection via .NET

      Post

           I'm attempting to update an old FM Pro v6 database up to v13, and some of the old SQL queries we were using to maintain our records aren't working anymore. Specifically, when attempting to add a record to an existing (and open) connection, I get the following error reported from FM Pro (that worked fine in FM 6).

           Query failed:

      
      INSERT INTO DemoDownloads (Date,EMail,Name,Expiry_Date,Serial,Product) 
      VALUES ('2014-06-03 11:22:01','my@email.com','my name','2014/07/03','XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XX','Product level')
      System.Data.Odbc.OdbcException: ERROR [42000] [FileMaker][FileMaker] FQL0001/(1:28): There is an error in the syntax of the query.
         at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, 
      Object[] methodArguments, SQL_API odbcApiMethod)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
         at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
         at OrderProcessingSystem.Database.AddRecord(String[] Records, Object[] Values) in C:\Proj\OrderProcessingSystem\Database.cs:line 81

            

           Obviously, DemoDownloads is the table name, and ODBC connections are enabled with the proper user settings. I have other queries (such as SELECT and UPDATE) working fine. Unless I'm missing something simple, I don't think my syntax is wrong. 

           I'm running FileMaker Pro 13.0v3 on Window 7 (x64), and have the FileMaker ODBC Driver (32-bit) v12.3.103 installed (required, because our app is in 32-bit mode).