Groups | Blog | Home
all groups > dotnet distributed apps > february 2005 >

dotnet distributed apps : Middle Tier - SQLDataAdapter question


Ross
2/18/2005 1:13:03 AM
Hi

This question might sound stupid, but I am a bit of a newbie.

If I have a SQL Server DB that has several tables that I want to be able to
add records, edit records & delete records, do I need a separate
SQLDataAdapter for each table?

Hope somebody can help.

Kind regards

Hussein Zahran
2/19/2005 9:55:07 AM
Hi Ross
It Depends on the Hierarchy of your DB structure you would need One
DataAdapter that deals with multiple tables or just one per table . as the
SqlDataAdapter just works as the communicator between your DataSets and the
Reall DB
Regards
Hussein Zahran

[quoted text, click to view]
LOZANO-MORÁN, Gabriel
4/18/2005 12:00:00 AM
The DataAdapter is the bridge to your data. You can perfectly use one
DataAdapter for each different connectionstring. So instead of using
seperate DataAdapters you should make use of seperate commands for each
table that you use to set the selectCommand, InsertCommand and
UpdateCommand. You should use seperate commands instead of changing the
referenced commands.

Personnaly I prefer using seperate DataAdapters for each table.

Gabriel Lozano-Morán

[quoted text, click to view]

AddThis Social Bookmark Button