Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 26th, 2005, 6:10 PM   #1
Arla
Professional Programmer
 
Arla's Avatar
 
Join Date: Mar 2005
Posts: 343
Rep Power: 4 Arla is on a distinguished road
Another random question, DataTable vs Array(s)

So, I return data from a database, and first off, from my "standard" programming background, I was bringing the data back in Arrays, it all worked okay, but arrays have a few issues for what I was trying to do, but then I found DataTables, question is..

How much data can you bring back from a database in a datatable? And how efficient/inefficient are they? Example, if I'm bringing back one row of data, but my class has the datatable defined, should I bring all the data back in the datatable? Or just bring it back in individual variables, and leave the datatables for the bigger stuff?

Thoughts?
Arla is offline   Reply With Quote
Old Apr 26th, 2005, 9:10 PM   #2
new User(Kevin.Parkinson)
Programmer
 
new User(Kevin.Parkinson)'s Avatar
 
Join Date: Mar 2005
Location: Edmonton, Alberta, Canada
Posts: 37
Rep Power: 0 new User(Kevin.Parkinson) is on a distinguished road
Send a message via MSN to new User(Kevin.Parkinson)
Arla:

For quick data access, like returning 1 or so rows, I would recommend the DataReader. Anything bigger, where you need perhaps more persistent data to manipulate on the client, I would use the DataSet

Kevin Parkinson
__________________
public class  MySignature extends Post implements JavaSyntax throws NuttinHoney{
     MySignature()
     {
          Salutation();
          Name();
     }
     
     public string  Salutation()
     {
          Screen.printLn( "Sincerely,\n" );
     }
     
     public string  Name()
     {
          Screen.printLn( "Kevin Parkinson" );
     }
}
new User(Kevin.Parkinson) is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:10 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC