OBDC SQL ERROR: one column is named 'key'.

johan

New member
Hello,
I am trying to setup a database connection in Anatella in order to read and write data directly form a database. However I am running into some problems trying to set up the write side. I have created the ODBC connection from Edit>Manage ODBC Connections, and set it up using a type 2 connection, i.d. based on connection string. It works beautifully to read data, but however when trying the simplest of write operations for testing purposes I get an error which I do not understand, and for which the AnatellaQuickGuide is no help. The only error I receive is the following:
ERROR: one column is named 'key'.
I have tried both updating and inserting data, but get the same error message in both cases.
Configuration:
johanforum1.jpg

johanforum2.jpg
 

Support

Administrator
Staff member
Hello Johan,
By default, the "key" keyword is forbidden in SQL.
This is why Anatella is preventing you to use this specific keyword.
This is why Anatella displays the above error message.
Just use another column's name and you'll be fine (e.g. rename the column "key" that you are trying to INSERT to "id").
There are some other keywords that also usually forbidden in SQL ("age", "year"). See the .anatella file in attachment to have an example of a generic script that allows you to upload any table in a Database.
See you!
 
Top