PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Problems with Dataset

Reply

Problems with Dataset

 
Thread Tools Rate Thread
Old 21-06-2006, 05:33 PM   #1
=?Utf-8?B?U0VHQUNP?=
Guest
 
Posts: n/a
Default Problems with Dataset


Hi,

I'm trying to use a DataAdapter with a complex query (in Oracle) to fill a
Dataset, but the DataAdapter don't accept it, then I try to create the
Dataset manually with the same fields that the query returns in the Designer
that VS.NET2003 provides, and then, create the DataAdapter in runtime, with
the complex query, an then, fill the Dataset, but nothing happens. If I try
to do the same with a DataReader, it works without a problem. There is a
example of my code.

Dim daAdendums As New OracleClient.OracleDataAdapter(complexQuery, conn)
Dim dsAdendums As New PrintDoc.dataset_Adendums
Dim drData As OracleClient.OracleDataReader

daAdendums.Fill(dsAdendums) 'it don't works the dataset is empty
drData = daAdendums.SelectCommand.ExecuteReader 'it works without a problem

Can someone help me?? Thanks
  Reply With Quote
Old 22-06-2006, 05:09 AM   #2
=?Utf-8?B?UmFq?=
Guest
 
Posts: n/a
Default RE: Problems with Dataset

can you please try

Dim dsAdendums As New PrintDoc.dataset_Adendums

as Dim dsAdendums As New DataSet

"SEGACO" wrote:

> Hi,
>
> I'm trying to use a DataAdapter with a complex query (in Oracle) to fill a
> Dataset, but the DataAdapter don't accept it, then I try to create the
> Dataset manually with the same fields that the query returns in the Designer
> that VS.NET2003 provides, and then, create the DataAdapter in runtime, with
> the complex query, an then, fill the Dataset, but nothing happens. If I try
> to do the same with a DataReader, it works without a problem. There is a
> example of my code.
>
> Dim daAdendums As New OracleClient.OracleDataAdapter(complexQuery, conn)
> Dim dsAdendums As New PrintDoc.dataset_Adendums
> Dim drData As OracleClient.OracleDataReader
>
> daAdendums.Fill(dsAdendums) 'it don't works the dataset is empty
> drData = daAdendums.SelectCommand.ExecuteReader 'it works without a problem
>
> Can someone help me?? Thanks

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off