but then you are bypassing the COM object that they wish to use to create the 
recordset.

-----Original Message-----
From: Stefan Finch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 11:28 AM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Catch 22... (Recordset to Dataset issue...)


Perhaps, but you could use SQL Server (FOR XML ..)  to generate an XML document, and 
load that into the .NET Dataset

-----Original Message-----
From: franklin gray [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 15:28
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Catch 22... (Recordset to Dataset issue...)


just a guess, but can you get the xml from the recordset and load the xml into a 
dataset?

-----Original Message-----
From: Rathna Raj [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 8:52 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Catch 22... (Recordset to Dataset issue...)


I am writing a  .NET client for a "legacy" COM+ middle-tier. Data (from
MSSQL Sever 2000) from the middle-tier is returned as ADO Recordsets.
Whenever the client requests for a new entity (like Customer, Vendor,
Items,....), appropriate COM+ business component gets a blank Recordset from
the respective table(s). The business component then adds a new record (by
now Recordset is disconnected), updates the newly added record with certain
default values (there is a bit of business logic involved in updating
default values) and then returns this Recordset to the client. In the .NET
client I convert the Recordset into Dataset using OleDbDataAdapter's Fill
method.

The problem here is, whenever you do a Fill on the Recordset, whose not-null
fields have null, Fill method fails. I was able to overcome this problem to
certain extent by adding some default values (like " " or 0 or current
date/time, depending on the data type of the field in question) to these
not-null fields. But, when I try to add 0 (or any integer value) to an
IDENTITY column, I get an ADO exception (rightly so)... If I don't update,
Fill fails... This is kind of catch22 situation. Any ideas to fix this
issue (apart from manually creating the Dataset from Recordset)???

TIA

Rathna Raj
Icode

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to