Generating typed datasets - how to??

  • Thread starter Thread starter John Sparrow
  • Start date Start date
J

John Sparrow

Anyone know of reference material for creating typed datasets
programatically?

I want to get similar functionality to the "Generate dataset" link in
SqlDataAdapter. I've read mention of an example in framework beta2.. anyone
got a copy I can download???

I guess I should be looking at TypedDataSetGenerator class, but the SDK docs
are virtually nonexistant.

Thanks,

John
 
Hi John,

If you use VS you only have to add a dataset from by instance the files new
or from the solution explorer to your IDE.

Create a dataset, generate it and when you open all files in your solution
explorer look at the generated datasetclass. (vb or cs)

Cor
 
Thanks for the help.

I'm using a non-SQL server data provider that doesn't build datasets
automatically (actually, the new Firebird SQL provider). www.firebirdsql.org

It seems a bit difficult to understand why the functionality to do this is
embedded in SqlDataAdapter, and not in another class that could be
interfaced with any type of adapter - unless of course MS wanted to
disadvantage other data providers! Surely not.

Anyway, I wrote a farely crude work-around. I put my SQL commands in a txt
file, then run a little program that passes them to Firebird, populates an
untyped dataset with the resulting schema, then uses the builtin functions
to produce XSD and CS files for the typed dataset. I then manually add the
CS to the project, recompile, and bob's ur uncle, I've got a cool typed
dataset!!

John
 
Hi John,

But you can I think if I understand you well.

You can make xml dataset in your designer.
Just open a new item dataset.

Then start filling the elements and connections or whatever (but start with
new element).
Than you can say generate dataset also just by rightclicking the button.
(rightclick on the form not on a table)

I hope this helps?

Cor
 
Back
Top