Problem with Typed DataSets and Case sensitive names

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
ephillipe
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

Problem with Typed DataSets and Case sensitive names

Post by ephillipe » Tue 06 Oct 2009 02:20

I create a Type Dataset with one Table Adapter. This Adapter contains two queries, the first is a default [select * from "Table"], the second is a parametrized query: [select * from "Table" where "ID" = :ID].

The problem occur when I reconfigure the Adapter. The second query is changed without quotes and parameter name is lost. The query auto generated is like that: [select field1, field2 from Table where ID = ?]; This cause an error because the name of field1 is "Field1".

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 06 Oct 2009 15:00

This is a known problem with a regeneration of commands when editing DataSet via DataSet Wizard ( http://www.devart.com/forums/viewtopic.php?t=15996 ). Do you edit your Table Adapter using DataSet Wizard?

ephillipe
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

Post by ephillipe » Tue 06 Oct 2009 16:13

Yes, I use Dataset Wizzard.
I get this error when I try fix another problem. When I create a TableAdapter, i user this query:

Code: Select all

SELECT * FROM Schema."Table" WHERE "ID" = :ID
* Note the schema name

The original problem is about Automatic Insert, Delete, Update statements. They don't generated. After hours of investigation, I discover! If I write a SCHEMA in a different case, the auto statments don't be generated. Then, I recreate a default query:

Code: Select all

SELECT * FROM schema."Table" WHERE "ID" = :ID
* The schema is exactly now

After this, my other queries in Table Adapter break.
Exists any way of this do not occur?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 07 Oct 2009 13:20

Please try quoting the names like "DatabaseName"."SchemaName"."TableName", because the "native" case for PostgreSQL is lower case. If you set the database object name in a statement without quotes, it will be translated to the name with all letters in lower case. Also please select the Quote names checkbox in the Command Generator tab of Table Adapter Editor when using DataSet Wizard to generate the commands with the quoted names.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 21 Oct 2009 12:36

We have fixed bugs with DataSet Wizard and sent a download link to you by e-mail.

Post Reply