| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Feb 2007 10:13:23
|
Darren_F
New member
Joined: 5 Sep 2006 13:43:06
Messages: 3
Offline
|
It looks like a ref cursor that is returned from a stored procedure is returned as a DataReader. The strange behavior I am seeing is that if I use a DataAdapter with its SelectCommand set to execute a stored procedure that returns a ref cursor and tell it to Fill a data table then it doesn't fill the datatable with the results of the query but rather fills it with just one column called 'name' and one single row with a string of "EnterpriseDB.EDBClient.EDBDataReader".
Under other databases this fills the data table with the columns and rows of the query results of the cursor, why should this be any different?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Feb 2007 10:17:15
|
Anonymous
|
Is my only options to set the data source on the datatable to the reader and call bind?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Feb 2007 10:40:57
|
Anonymous
|
I meant calling Load on the data table and passing the reader which I have tried and it blows up with another problem.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Feb 2007 13:02:31
|
farrukh
Senior member
Joined: 25 Mar 2008 02:56:43
Messages: 255
Offline
|
Hi Daren,
What problem are you using while using the reader?
Thanks,
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Feb 2007 13:03:09
|
farrukh
Senior member
Joined: 25 Mar 2008 02:56:43
Messages: 255
Offline
|
Hi Daren,
What problem are you getting while using the reader with Load?
Thanks,
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 1 Mar 2007 10:50:38
|
Anonymous
|
See the topic titled:
"DataReader/DataTable bug in .NET connector"
The error is:
{"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."}
The issue is that the comm column in the edb sample database has some null values and for some reason the datareader/datatable is not allowing the nulls. The meta data for that columns says AllowDBNull = false for the Decimal column "comm". This is not anything that is controlled with my code. I just created a blank DataTable and told it to load using the reader that came back from the stored procedure ref cursor.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 5 Mar 2007 03:36:30
|
fahd.najmi
Member
Joined: 25 Mar 2008 02:56:43
Messages: 28
Offline
|
Dear Darren,
This issue has been addressed in one of our posts on the same forum. Please refer to the url below for more information over the issue:
http://support.enterprisedb.com/default.asp?edb-developer.1.3649.3
Hope you find it useful.
Best regards,
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 5 Feb 2012 14:26:37
|
hu_yang
New member
Joined: 5 Feb 2012 14:25:12
Messages: 1
Offline
|
check this url , this may help u
http://csharp.net-informations.com/dataadapter/csharp-dataadapater-tutorial.htm
lee.
|
|
|
 |
|
|