advice needed - what approach for sql access

K

KavvY

After messing about I've made some headway towards getting a DataSet filled
with data from an SQL database, unfortunately I've been advised that this
isn't the way forward due to the overhead involved of filling the DataSet
with every page access.

So what method is prefereable to use?

Am I supposed to create a DataAdapter that only fetches a certain query,
dependant on what the users type in fields? Or am I supposed to use a
DataSet in the same way?

The book I bought is pretty useless in the respect that it focuses on the
DataSet as the all-encompasing solution to all your needs. Which I debate
TBH.

All I want to do is execute SQL queries and put the results in to text
boxes, then update the SQL tables with an update query afterwards....

Any advice greatly appreciated.
Rich.
 
C

CT

One option is to cache the DataSet in the Session or ViewState. I can't tell
how much data you're retrieving, but that obviously affects what is the
"right" approach for you. If you need to display and update data, the
DataSet is most likely your best choice. Are you extracting data from just
one table, in which case you might just need the populate a DataTable object
instead of a DataSet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top