Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Dynamic Data Connection

Dynamic Data Connection

Scheduled Pinned Locked Moved C#
databasecss
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mfcuser
    wrote on last edited by
    #1

    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.

    S 1 Reply Last reply
    0
    • M mfcuser

      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.

      S Offline
      S Offline
      sinosolo
      wrote on last edited by
      #2

      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

      M 1 Reply Last reply
      0
      • S sinosolo

        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

        M Offline
        M Offline
        mfcuser
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups