VB.NET DataAdapter question

E

Eric A. Johnson

I'm using ADO style. I have an Access database with four tables that I will
want to do queries on. I will want to do queries on all four tables, at
least individually, and possibly at the same time (using "INNER JOIN"). My
question: Is it better to have four individual DataAdapters, one for each
table, with the DataSet linking to a different one for each query; one
single DataAdapter, that would connect to all four tables at once; or some
kind of combination of the two? Any tips? As you can tell, I'm rather a
newbie at databases.

Thanks,
Eric
 
L

Leon Mayne [MVP]

Eric said:
I'm using ADO style. I have an Access database with four tables that
I will want to do queries on. I will want to do queries on all four
tables, at least individually, and possibly at the same time (using
"INNER JOIN"). My question: Is it better to have four individual
DataAdapters, one for each table, with the DataSet linking to a
different one for each query; one single DataAdapter, that would
connect to all four tables at once; or some kind of combination of
the two? Any tips? As you can tell, I'm rather a newbie at
databases.

It's best to have just one adapter per query. It doesn't matter how many
tables you are including in your query, it's the job of the database to link
them together, not .NET
 
S

S.M. Altaf [MVP]

You may also want to consider setting up relations between your tables in
the dataset, but this of course depends upon your requirements.

-Altaf
[MVP-VB]
 
C

CT

If you only need to query and not update the data, and if you only need
related data from the tables, I don't see any reason why you shouldn't go
with a single DataAdapter and a single result set in a DataSet. The
resultset is obviosuly created using a JOIN in the SQL statement. However,
if you do need to update, I'd go with four different tables in 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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top