- 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?
FillSchema and Domains: Wrong DataType "string" delivered
-
- Posts: 6
- Joined: Fri 26 Mar 2010 09:48
- Location: Germany
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
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
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