Page 1 of 1

dotConnect for Oracle v5.70 bug report

Posted: Fri 18 Jun 2010 15:59
by doggy8088
Hi,

There is one table of my client's Oracle DB that contains a reserved keyword as the Column Name. When I using Devart LinqConnect Model to query some data and apply some filter condition with the "special" column will cause an Exception. That exception was occured due to some column not encoded as a double quote (") in the column name in the WHERE clause that Devart LinqConnect Model generated.

for example:

Code: Select all

var q = (from p in db.Table1 where p.COLUMN == "TEST" select p).ToList();
This LINQ query transform into the following SQL command like this:

Code: Select all

SELECT * FROM TBS.Table1 WHERE TBS.COLUMN = 'TEST'
But you should transform LINQ as the following:

Code: Select all

SELECT * FROM TBS.Table1 WHERE TBS."COLUMN" = 'TEST'
I would like to suggest you to apply surrounding double quote on each column name to avoid this problem.

Posted: Mon 21 Jun 2010 16:51
by StanislavK
Thank you for your report, we've reproduced the problem.

At the moment, we quote the column names that need to be quoted, like reserved words or names with blank spaces inside. We will fix the problem with the 'column' keyword. Could you please specify (if any) other reserved words with which you've encountered such problems?

As a workaround, you may quote the problem columns manually: double-click them on the model and quote the Source property.

Posted: Mon 21 Jun 2010 17:07
by doggy8088
Thanks for your workaround.

For my oracle db, there is only "COLUMN" name has been used.

For complete oracle reserved keyword list, please refer to "Oracle Reserved Words". Here is the url:
http://download-west.oracle.com/docs/cd ... _words.htm

Posted: Wed 23 Jun 2010 10:06
by AndreyR
Thank you for the additional information, we are working on this issue.

Posted: Thu 24 Jun 2010 10:28
by fni
Wouldn't it make more sense to quote all columns or would this have a performance impact?

Posted: Fri 25 Jun 2010 15:05
by StanislavK
We avoid quoting where it is not necessary for simplicity and performance sake. Queries with redundant quotes would be less clear, a little larger, and processed at the server a little slower.