| | |
How to make it faster ? c# and dataBase
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2007
Posts: 17
Reputation:
Solved Threads: 0
Hi 
I have 3 DataGrids (and even more in the future) that supose to present data from a DataBase.
When i press on the main DG all the rest
are updated according to a cartein Code Index.
The problem is that its very slow and
i want to make it faster.
Im doing it like that:
1) When clicking on the main DG.
2) Code Index is taking from the DG.
3) a connection is created to a diffrent
table in the DataBase.
4)according to this Code Index, this
table is fitered using SQL string.
5)the dataSet is presented in a dataGrid.
Thos steps happend everytime i click
on a cell in the main DataGrid.
The problem is that this is slow
and i want to make it faster,
how can i do that ?
HERE IS THE CODE:
Thanks.

I have 3 DataGrids (and even more in the future) that supose to present data from a DataBase.
When i press on the main DG all the rest
are updated according to a cartein Code Index.
The problem is that its very slow and
i want to make it faster.
Im doing it like that:
1) When clicking on the main DG.
2) Code Index is taking from the DG.
3) a connection is created to a diffrent
table in the DataBase.
4)according to this Code Index, this
table is fitered using SQL string.
5)the dataSet is presented in a dataGrid.
Thos steps happend everytime i click
on a cell in the main DataGrid.
The problem is that this is slow
and i want to make it faster,
how can i do that ?
HERE IS THE CODE:
C# Syntax (Toggle Plain Text)
****************************************** dataGridView2.DataSource = null; string CoString = @"Provider=PervasiveOLEDB;" + @"Data Source=Z:\index;"; string strSql2 = "SELECT description,street,number,settling FROM addresses WHERE code=" + code; OleDbConnection con = new OleDbConnection(CoString); con.Open(); // Addresses Table OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.SelectCommand = new OleDbCommand(strSql2, con); DataSet dataset2 = new DataSet(); adapter.Fill(dataset2, "addresses"); this.dataGridView2.DataSource = dataset2.Tables[0]; this.dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader; this.dataGridView2.AutoResizeColumns(); //Close Connection con.Close(); ******************************************
Thanks.
•
•
Join Date: Oct 2007
Posts: 172
Reputation:
Solved Threads: 16
I propose for u a solution, may be that get your application faster
use the tool negen.exe of the dotnet framework it creates a native image of your exe assembly in aspecified files and install them in the native image cache of the computer and that avoid the JIT compile your exe assembly each time u use the application
to do this
click on start -> Microsoft.Net Framework SDK v2.0 -> SDK command prompt
the tape
negen install exefilepath.exe
and then press enter
try this proposal
use the tool negen.exe of the dotnet framework it creates a native image of your exe assembly in aspecified files and install them in the native image cache of the computer and that avoid the JIT compile your exe assembly each time u use the application
to do this
click on start -> Microsoft.Net Framework SDK v2.0 -> SDK command prompt
the tape
negen install exefilepath.exe
and then press enter
try this proposal
![]() |
Similar Threads
- Creating a Basic String Database (C++)
- firebird database (MS SQL)
- Database encryption (ASP.NET)
- access database search and display (Visual Basic 4 / 5 / 6)
- Help making this faster (Visual Basic 4 / 5 / 6)
- Faster Repaint (Java)
- Help me make a list of database servers! (Database Design)
Other Threads in the C# Forum
- Previous Thread: add node to xmlfile
- Next Thread: hello need help,i have an project.
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum equation event excel file form format formatting forms function gdi+ httpwebrequest image index input install interface java label list listbox mandelbrot math mouse mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remote remoting resource restore richtextbox server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation visualstudio wait webbrowser windows winforms working wpf xml





