Unknown ODBC error


I’m having trouble using the ODBC functionality of eggplant to execute SQL-queries.

I use the following script

set myDB to (type:"odbc", DSN:"eggPlantTest", user:"root", password:"****")

put ("BULK INSERT dbName.tableName from 'filepath	emp\TestFormat.csv' WITH (FIELDTERMINATOR = ',', ROWTERMINATOR = '
');") into statement

open database myDB

put executeSQL(myDB, statement)

close database myDB

On running the script I get the error message “Unknown ODBC error”
I have tried various variations of this script and each time get the same error

Could anyone help me with this please? Do I need additional parameters? The DB connection can be built but as soon as I execute the executeSQL function the error message is displayed.
Am I missing something?

Thanks in advance

Hi ,

I am also getting same error when i pass the SQL query thro’ a variable.
Is there a workaround for it.


There’s some problem with the query string. Try:

put executeSQL(myDB, quote & statement & quote)