Problem with Typed DataSets and Case sensitive names

Problem with Typed DataSets and Case sensitive names

Postby 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".
ephillipe
 
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

Postby 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?
Shalex
Devart Team
 
Posts: 7773
Joined: Thu 14 Aug 2008 12:44

Postby 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?
ephillipe
 
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

Postby 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
Devart Team
 
Posts: 7773
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Wed 21 Oct 2009 12:36

We have fixed bugs with DataSet Wizard and sent a download link to you by e-mail.
Shalex
Devart Team
 
Posts: 7773
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL