Page 1 of 1
Windows Form SQL Query Demo (asynchronously)
Posted: Thu 13 Sep 2012 16:40
by lewis
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.
Re: Windows Form SQL Query Demo (asynchronously)
Posted: Tue 18 Sep 2012 15:51
by Shalex
Re: Windows Form SQL Query Demo (asynchronously)
Posted: Thu 20 Sep 2012 17:17
by lewis
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.
Re: Windows Form SQL Query Demo (asynchronously)
Posted: Fri 12 Oct 2012 12:48
by Pinturiccio
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);