Best approach, Loading Tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a sqlclient app to modify look up tables on a sql dbase,
there are some 8~10 tbls I think. I have some general idias of what to do,
but I have never done something like this, I am using VBExpress 2005. I
would be great if someone could give a roadmap of the steps to follow to load
the data to the client, concidering efficency and speed. I specially having
problem figuring out wich classes to use to load each table, maintaining the
constraints and all of that. If someone could give some idias I would really
appreciate it. TIA
 
Thank you Ryan.
I was looking not for the step by step guide, I was more concerned with the
way to load the tables, whether using a DataAdapter per table of one for all.
Something like this. I still reading and gathering info. But if someone who
has done something like this (data client app), would tell me what to look
for or watch out, it would help me get ready faster.
 
You can use and reuse the data adapter as needed. As you can see from this
simple snippet, the dataadapter does not care about which table it is
sending data to and from -- it just needs to know the appropriate
Select/Update/Insert/Delete commands (in the following, "cmd" is a
paramterized command that calls a stored procedure). Nor does it matter what
datatable it is to fill -- it simply needs the name of the datatable.

SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
 
Back
Top