Page 1 of 1

FillSchema and Domains: Wrong DataType "string" delivered

Posted: Fri 26 Mar 2010 10:05
by tgrossjean
- 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?

Posted: Mon 29 Mar 2010 08:49
by StanislavK
We have reproduced the problem. We will investigate the situation and inform you about the results.

Posted: Tue 11 May 2010 12:44
by tgrossjean
*** Any news? ***

Posted: Wed 12 May 2010 12:25
by StanislavK
We have fixed the problem. The fix will be available in the nearest build, which we plan to release in several days.

Posted: Fri 21 May 2010 16:43
by StanislavK
We have released the new 4.95.140 build of dotConnect for PostgreSQL. It can be downloaded from
http://www.devart.com/dotconnect/postgr ... nload.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