dotConnect for Oracle v5.70 bug report

dotConnect for Oracle v5.70 bug report

Postby doggy8088 » Fri 18 Jun 2010 15:59

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.
doggy8088
 
Posts: 8
Joined: Tue 15 Jun 2010 18:03

Postby StanislavK » Mon 21 Jun 2010 16:51

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby doggy8088 » Mon 21 Jun 2010 17:07

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/B19306_01/em.102/b40103/app_oracle_reserved_words.htm
doggy8088
 
Posts: 8
Joined: Tue 15 Jun 2010 18:03

Postby AndreyR » Wed 23 Jun 2010 10:06

Thank you for the additional information, we are working on this issue.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby fni » Thu 24 Jun 2010 10:28

Wouldn't it make more sense to quote all columns or would this have a performance impact?
fni
 
Posts: 25
Joined: Wed 27 Jan 2010 13:20

Postby StanislavK » Fri 25 Jun 2010 15:05

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle