ODBC & reserved keywords

Posted by gdb390 on 04-Sep-2009 02:16


We have a problem with ODBC and a database field that is called TYPE ... this a reserved keyword and ODBC doesn't like it ...

Is there a way to solve this problem without renaming the database field ... (and yes I know, it was a bad decision to name the database field TYPE )

Otherwise we need a complete scanning of our code ...

kind regards


All Replies

Posted by Admin on 04-Sep-2009 02:27

Usually quoting the fieldname or tablename.fieldname should work.

Try connecting to the database from OpenEdge Architect and see how a full select in the DB Navigator perspective solves the issue.

Posted by Thomas Mercer-Hursh on 04-Sep-2009 10:43

Double quotes is your basic solution here.  Works also for things like hyphenated field names.

Posted by gdb390 on 07-Sep-2009 06:43

thanks, the quotes did it !!

kind regards


Posted by cverbiest on 07-Sep-2009 08:05

Hi Gerd,

an alternative to this method is to create views in which the invalid name is replaced by a valid name

See PKB ID: P11495
Title: "Error 7519 running a SQL-92 query that contains a hyphen, dash, or reserved word in a table or field name"

This thread is closed