OracleDataTable - Asynchronously - BeginFill EndFill Usage

OracleDataTable - Asynchronously - BeginFill EndFill Usage

Postby lewis » Thu 02 May 2013 17:48

Hi, could you please supply me with a Sample working code where can i see the right usage of fetching data asynchronously from database using OracleDataTable?, i have studied all information related that is available (OracleDataTable Advanced Features) and so on, but i couldn't get to work it, i would you use BeginFill,EndFill, CancelFetch etc. when i want.

I wrote the code below, but there is no records fectched when i got the result :

myResult = (AsynResult)this.oracleDataTable.BeginFill(new AsynCallBack(OperationComplete),this.oracleDatable);

thanks
lewis
 
Posts: 11
Joined: Thu 13 Sep 2012 15:59

Re: OracleDataTable - Asynchronously - BeginFill EndFill Usage

Postby lewis » Thu 02 May 2013 18:56

Also i noticed that :

oracleDataTable.Rows.Count = 0
oracleDataTable.Columns.Count = 12;

meaning that Columns definitions were loaded but data don't.
lewis
 
Posts: 11
Joined: Thu 13 Sep 2012 15:59

Re: OracleDataTable - Asynchronously - BeginFill EndFill Usage

Postby lewis » Fri 03 May 2013 12:53

Hi, finnally i got to the code below :

myDataTable.Connection = myConnection;
myDataTable.SelectCommand = myConnection.CreateCommand();
myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept";

IAsyncResult aRes = myDataTable.BeginFill(null, null);

Console.Write("Fetch in process");

Thread.Sleep(100);
myDataTable.SuspendFill(true);
Console.Write("Fetch is stopped");

myDataTable.EndFill(aRes);
Console.Write("All records are fetched");

I fetched the data and show it in DataGriview by setting the Datasource property, however the fetching proccess only retrieve 5 records automaticatly, how can increase the nummber of records fetched at once.

Thanks in advance for your help.
lewis
 
Posts: 11
Joined: Thu 13 Sep 2012 15:59

Re: OracleDataTable - Asynchronously - BeginFill EndFill Usage

Postby Pinturiccio » Fri 10 May 2013 12:50

We are investigating the issue and will notify you about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44

Re: OracleDataTable - Asynchronously - BeginFill EndFill Usage

Postby Pinturiccio » Wed 15 May 2013 14:46

lewis wrote:how can increase the nummber of records fetched at once.

The number of records fetched at once during Asynchronous BeginFill execution can't be set. Asynchronous Fetch is not designed for this. If you want to control the number of records fetched at once, you should use Sequential Fetch Mode or Paginal Fetch Mode
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle