Skip to content
+1-888-319-3663

COMMUNITY FORUM

Task > Document success > SQL insert = incorrect syntax near + ODBC FirstRowHasNames errors

Brad asked 2 years ago
We have an order header field called ‘general description’ we’d like to populate when importing orders. The table that holds this field does not include the document record unless one of our user-defined fields are already populated.
This is a SalesPad table used to hold user-defined fields for order headers.
 
Trying to insert a record into this table after the document is created. Inserting three fields:

  • The sales document number (GlobalRollingColumn)

  • The sales document type (static value)

  • The ‘general description’ text from my excel file


 
SQL command:

INSERT INTO SPXSALESDOCUMENT (SALES_DOC_NUM, SALES_DOC_TYPE, XGENERALDESCRIPTION) VALUES ( GlobalRollingColumn , ‘ORDER’,   _GenDescr );

 
I receive two errors for each document import.

Task GENDESCR failed. Document run will end reporting failure. Incorrect syntax near ‘PLANT’.
Processing failed for data rows matching Store = ‘2695’

 
The ‘general description’ text from my XL file is

FL5 PLANT BASED HEADER & BLADES

 
Was thinking the space character in the excel cell prior to ‘plant’ might be the issue but suspect its something else.
The excel column name contains a space character ‘Gen Descr’ but so do other column names. This excel column is formatted as text. 
 
Digging deeper, the SmartConnect log includes this information entry.

Connection could not be validated.ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x4068 Thread 0x5950 DBC 0x9cabecc                                                            Excel’.
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x4068 Thread 0x5950 DBC 0x9cabecc                                                            Excel’.
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [HY000] [Microsoft][ODBC Excel Driver] Could not find installable ISAM.
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x4068 Thread 0x5950 DBC 0x9cabecc                                                            Excel’.
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x4068 Thread 0x5950 DBC 0x9cabecc                                                            Excel’.
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [HY000] [Microsoft][ODBC Excel Driver] Could not find installable ISAM.

 
When I disable this task the map runs successfully.
Screenshots: https://photos.app.goo.gl/5d6HyYTpu6YVntFd9
 
 

If you would like to submit an answer or comment, please sign in to the eOne portal.