Dynamic Data Connection
-
Using vs2005, from the data explorer window, I can add a new connection and bring my data in. Using the datagrid view, I can attach a table to view my data. I can also use sql statement to view the data table to the grid. Although I haven't tried both of them on the same application. It looks like it is fater to display the data to the grid from the data explorer than using sql statement. What I mean, I mean that an application that use the database explorer to bring data in should be faster than one that use sql statement. I tried both of them in different application, I have seen that it always take more time for the sql statement to run than fill the grid. The way I look at it, by using the databse explorer, when the application is loaded or run, the connection and the data tables are also initializeed. Therefore, it is faster, which is opposed to runing sql statement. When I use sql statement here, I mean I mean something like oledbconnection. Let me know if I am right.
-
Using vs2005, from the data explorer window, I can add a new connection and bring my data in. Using the datagrid view, I can attach a table to view my data. I can also use sql statement to view the data table to the grid. Although I haven't tried both of them on the same application. It looks like it is fater to display the data to the grid from the data explorer than using sql statement. What I mean, I mean that an application that use the database explorer to bring data in should be faster than one that use sql statement. I tried both of them in different application, I have seen that it always take more time for the sql statement to run than fill the grid. The way I look at it, by using the databse explorer, when the application is loaded or run, the connection and the data tables are also initializeed. Therefore, it is faster, which is opposed to runing sql statement. When I use sql statement here, I mean I mean something like oledbconnection. Let me know if I am right.
Try do not to use OleDBConnection, use the respective "professional" data connection. eg. for MS Sql Server, use SqlConnection, while for Oracle, use OracleDataConnection. yes, the connection built by data explorer seems to be faster than the manual built one. but it's just because the former will be initiallezed at the very begining of the application start. for the latter, if you try more times, you will find it has the same speed with the former one; and, it's more flexible
A Positive Thinker
-
Try do not to use OleDBConnection, use the respective "professional" data connection. eg. for MS Sql Server, use SqlConnection, while for Oracle, use OracleDataConnection. yes, the connection built by data explorer seems to be faster than the manual built one. but it's just because the former will be initiallezed at the very begining of the application start. for the latter, if you try more times, you will find it has the same speed with the former one; and, it's more flexible
A Positive Thinker
What is the difference between oledbconnection and sqlconnection? I have been using oledbconnection. I have seen a lot of people using oledbconnection. I am using ms accesss just for testing, that will change later when I get sql express working. Can I use sql connection for ms access database?