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".
Problem with Typed DataSets and Case sensitive names
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?
Yes, I use Dataset Wizzard.
I get this error when I try fix another problem. When I create a TableAdapter, i user this query:
* 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:
* The schema is exactly now
After this, my other queries in Table Adapter break.
Exists any way of this do not occur?
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
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
After this, my other queries in Table Adapter break.
Exists any way of this do not occur?
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.