Page 1 of 1

Problem with Typed DataSets and Case sensitive names

Posted: Tue 06 Oct 2009 02:20
by ephillipe
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".

Posted: Tue 06 Oct 2009 15:00
by Shalex
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?

Posted: Tue 06 Oct 2009 16:13
by ephillipe
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?

Posted: Wed 07 Oct 2009 13:20
by Shalex
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.

Posted: Wed 21 Oct 2009 12:36
by Shalex
We have fixed bugs with DataSet Wizard and sent a download link to you by e-mail.