Windows Form SQL Query Demo (asynchronously)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
lewis
Posts: 23
Joined: Thu 13 Sep 2012 15:59

Windows Form SQL Query Demo (asynchronously)

Post by lewis » Thu 13 Sep 2012 16:40

Hi, I need to create a Windows Application that allows me:

-Show in a dataGrid from database by using a select statement.
-Load the grid asynchronously and stop the filling whenever i want.
-Navigate between records pages according a number of max records (asynchronously).
-Navigate through the final page of the records collection in the database and cancel it, if i want.

Could you please give me any help about those requierements above?

P.D. I have a small demo aplication already with the basica idea, could i send it? What is the e-mail?

I have read all documentation related but i have couldn't find the solution

Thanks in advance.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Windows Form SQL Query Demo (asynchronously)

Post by Shalex » Tue 18 Sep 2012 15:51

Please refer to
http://www.devart.com/dotconnect/oracle ... Table.html
http://www.devart.com/dotconnect/oracle ... Table.html

If this doesn't help, please send us a small test project and describe the issue you have encountered.

lewis
Posts: 23
Joined: Thu 13 Sep 2012 15:59

Re: Windows Form SQL Query Demo (asynchronously)

Post by lewis » Thu 20 Sep 2012 17:17

Thanks for your answer,I read de information provided in the link already but i couldn't resolve my problem.

I sent the windows form demo application according with your suggestion.

Thanks.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Windows Form SQL Query Demo (asynchronously)

Post by Pinturiccio » Fri 12 Oct 2012 12:48

lewis wrote:-Show in a dataGrid from database by using a select statement.
Set your DataTable as a value of the DataSource property for the dataGridView control.
lewis wrote:-Load the grid asynchronously and stop the filling whenever i want.
Use the BeginFill method for starting asynchronous fill. Use the SuspendFill method for suspending asynchronous fill operation. Use the EndFill method for ending an asynchronous invocation of the Fill method.
For more information, please refer to http://www.devart.com/dotconnect/oracle ... #pureasync
lewis wrote:-Navigate between records pages according a number of max records (asynchronously).
Use the FillPage or Open methods of the OracleDataTable class to navigate between records pages.
For more information, please refer to http://www.devart.com/dotconnect/oracle ... ml#paginal
http://www.devart.com/dotconnect/oracle ... lPage.html
http://www.devart.com/dotconnect/oracle ... ~Open.html
lewis wrote:-Navigate through the final page of the records collection in the database and cancel it, if i
want.
You can get the number of records in your query by executing the following command:

Code: Select all

string str = "select count(*) from servsusc"; // by parsing this.txtSQL.Text, we get the select part, the part which would be an argument of the count function, and the last part which would begin with "from"
OracleCommand cmd = new OracleCommand(str, this.oracleConnection);
int count = Convert.ToInt32(cmd.ExecuteScalar());
After you know the count of records, you can call the FillPage method:

Code: Select all

this.oracleDataTable.FillPage(count-PageCount, PageCount);

Post Reply