Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Database access (speed and efficiency)

  1. #1
    Join Date
    Jul 2006
    Posts
    276
    Rep Power
    0

    Default Database access (speed and efficiency)

    whats the best method to use when receiving information from a database? Datasets, DataReader, Datarow etc. Which provides the effecient way to access your database?
    The greatest discovery of all men through lifetime is that a man can alter his life by altering his attitude!

  2. #2
    Join Date
    Dec 2004
    Posts
    1,181
    Rep Power
    0

    Default

    If you are using sql server, then stored procedures is the best solution, as the bulk of the work is done by pre-compiled code (t-sql) in the database.
    'If we're supposed to work in Hex, why have we only got A fingers?'

    Follow Me: @psybuck2002us

  3. #3
    Join Date
    Jul 2006
    Posts
    276
    Rep Power
    0

    Default

    Quote Originally Posted by psybuck2002us View Post
    If you are using sql server, then stored procedures is the best solution, as the bulk of the work is done by pre-compiled code (t-sql) in the database.
    What if you are using MS ACCESS
    The greatest discovery of all men through lifetime is that a man can alter his life by altering his attitude!

  4. #4
    Join Date
    Dec 2004
    Posts
    1,181
    Rep Power
    0

    Default

    I do recall you can write queries in access. You can then call them from your program. It behaves like stored procedures but their not the same. The purpose of having queries separate from your program is a means to lessen the dependence of your program on the structure of the database.

    To be honest, i am not an access man, i use mostly sql server and mysql so don't quote me.
    'If we're supposed to work in Hex, why have we only got A fingers?'

    Follow Me: @psybuck2002us

  5. #5
    Join Date
    Jun 2002
    Posts
    648
    Rep Power
    0

    Default

    Quote Originally Posted by norminator View Post
    What if you are using MS ACCESS
    Careful how you use Access. Do not use Access on projects with large volume datasets. But i guess its good enough to use for smaller projects. Anything over 30,000 records I would recommend a database server like MSSQL, MYSQL, PostgreSQL, etc.
    I recommend Ubuntu

  6. #6
    Join Date
    Dec 2004
    Posts
    1,181
    Rep Power
    0

    Default

    Access sucks period if your coding a separate application in VB.NET. If you use VBA in Access, thats a whole other story. It's pretty powerful on it's own, but i rarely ever use it. If i am working on a small project where security is not a concern, i use XML. May not be as efficient, but i get less headaches.
    Last edited by psybuck2002us; Oct 7, 2007 at 08:48 PM.
    'If we're supposed to work in Hex, why have we only got A fingers?'

    Follow Me: @psybuck2002us

  7. #7
    Join Date
    Jan 2007
    Posts
    164
    Rep Power
    18

  8. #8
    Join Date
    Jul 2006
    Posts
    276
    Rep Power
    0

    Default

    well I know access aint powerful, I mostly use sql server but you still have to put into consideration about organisations who uses ms access.
    The greatest discovery of all men through lifetime is that a man can alter his life by altering his attitude!

  9. #9
    Join Date
    Dec 2002
    Posts
    500
    Rep Power
    0

    Default

    regardless of whether u use access, sqlserver or any other database for that matter, DataReader will retrieve bulk data faster than DataAdapter.

    the primary reason is because DataAdapters use data readers to fetch their data, then do additional functions to create the datatable.

    so in essence :
    DataReader = Read data and return it as readonly stream (easy)

    DataAdapter = Read data and return it, then instantiate tables and configure columns and create events and attach them and call them when columns are changed and rows are added and check that the data being assigned matchs the type for the column and check constraints and references to other tables[/HTML]
    Cultured in Aggression and Koding like a Warrior!!
    “Common sense is instinct. Enough of it is genius.” - George Bernard Shaw.
    "The significant problems we face cannot be solved by the same level of thinking that created them." - Albert Einstein

  10. #10
    Join Date
    Jul 2006
    Posts
    276
    Rep Power
    0

    Default

    Oh zeen but datareader lacks certain functionalities! So thats why you only use datareader in specific instances and the latter in other!
    The greatest discovery of all men through lifetime is that a man can alter his life by altering his attitude!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •