FillSchema and Domains: Wrong DataType "string" delivered

FillSchema and Domains: Wrong DataType "string" delivered

Postby tgrossjean » Fri 26 Mar 2010 10:05

- FillSchema seems to work wrong with Domain-DataTypes.
- DataAdapter.Fill() work well.


Example:


1. Create Table with Domain in Database:

create domain my_dom as INTEGER
check (value between 1 and 10);

create table my_table
(
i INTEGER,
v "varchar",
j my_dom
);

insert into my_table values (17, 'helo', 7);

2. Query the Table from c#:

//Version 1
PgSqlDataAdapter da1 = new PgSqlDataAdapter("select * from my_table", con);
PgSqlDataSet ds1 = new PgSqlDataSet();
da1.FillSchema(ds1, SchemaType.Source);

MessageBox.Show(ds1.Tables[0].Columns["j"].DataType.ToString());
//Output is ==> System.String / This is wrong! Domain-Basetype has not been recognized!

//Version 2
PgSqlDataAdapter da2 = new PgSqlDataAdapter("select * from my_table", con);
PgSqlDataSet ds2 = new PgSqlDataSet();
da2.MissingSchemaAction = MissingSchemaAction.AddWithKey;
da2.Fill(ds2);

MessageBox.Show(ds2.Tables[0].Columns["j"].DataType.ToString());
//Output is ==> System.Int32 / Everything ok! Domain-Basetype delivered as it should!


Did i get something wrong or is it an error of the FillSchema()-Method?
tgrossjean
 
Posts: 6
Joined: Fri 26 Mar 2010 09:48
Location: Germany

Postby StanislavK » Mon 29 Mar 2010 08:49

We have reproduced the problem. We will investigate the situation and inform you about the results.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby tgrossjean » Tue 11 May 2010 12:44

*** Any news? ***
tgrossjean
 
Posts: 6
Joined: Fri 26 Mar 2010 09:48
Location: Germany

Postby StanislavK » Wed 12 May 2010 12:25

We have fixed the problem. The fix will be available in the nearest build, which we plan to release in several days.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Fri 21 May 2010 16:43

We have released the new 4.95.140 build of dotConnect for PostgreSQL. It can be downloaded from
http://www.devart.com/dotconnect/postgresql/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

The new build contains fix for problem with retrieving schema for tables with domain fields. For more information on fixes and improvements available in version 4.95.140, please see
http://www.devart.com/forums/viewtopic.php?t=18032
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for PostgreSQL