Generate XML Dataset

  • Thread starter Thread starter Juan Romero
  • Start date Start date
J

Juan Romero

Hi guys,

Is there a way to use a single SQL adapter to update many tables in a
database, or do I have to create an SQL Adapter for every table?

I have 35 tables on this database, so it is a bit painful.

Anyways, when I configure the data adapter, it seems to only allow you to
select one table. Is there a way to select more than one?

If not, is there a way to generate the dataset from a database or a number
of tables? If I use the same adapter, it deletes the schema and rewrites it
with the new table I select.

Please help.

Regards.
 
Hi guys,

Is there a way to use a single SQL adapter to update many tables in a
database, or do I have to create an SQL Adapter for every table?

I have 35 tables on this database, so it is a bit painful.

Anyways, when I configure the data adapter, it seems to only allow you
to select one table. Is there a way to select more than one?

If not, is there a way to generate the dataset from a database or a
number of tables? If I use the same adapter, it deletes the schema and
rewrites it with the new table I select.

Please help.

Regards.

A DataAdapter only has ONE of each Update, Delete, and Insert commands.
A given command can only affect one table. So, you need a different
DataAdapter for each table.

Why not wrap the data access for a single table into a single class.
Then that class creates it's own DataAdapter, Commands, and Parameters as
needed. Then put edit methods on those classes that act appropriately.

I recommend you use a code generator. Write the code once to do all the
work associated for one table, then turn that into a template for the
code generator you use. Or use a default template that comes with the
generator.

I have created a generator you can use free of charge. See my signature.
There are also for pay generators you can buy that have more features
and/or more templates. You can find them on google, or by looking
through this newsgroup.

--
Michael Lang, MCSD
See my .NET open source projects
http://sourceforge.net/projects/colcodegen (simple code generator)
http://sourceforge.net/projects/dbobjecter (database app code generator)
http://sourceforge.net/projects/genadonet ("generic" ADO.NET)
 
Back
Top