E
_eddie_
I'm still trying to figure out the best way to approach this problem:
I have to create a (SQL server) database and tables within C# code
(Ado.net) and then create a strongly typed dataset from that table...
Or is the reverse possible? It would seem that there's enough info in
a strongly typed dataset to create the database/tables.
I haven't seen this mentioned in books on ADO.net, possibly because
they usually use pre-existing db's for their examples. But it's a
problem that should come up quite a bit in production code. I do need
to create everything from inside the C# code, so I'd like to avoid
coding lots of embedded SQL if possible.
It does look like a chicken or egg problem: If the SQL Server table
already exists, then it's a snap to create the dataset. But alas, it
does not exist yet (on the target installations, anyway).
I have to create a (SQL server) database and tables within C# code
(Ado.net) and then create a strongly typed dataset from that table...
Or is the reverse possible? It would seem that there's enough info in
a strongly typed dataset to create the database/tables.
I haven't seen this mentioned in books on ADO.net, possibly because
they usually use pre-existing db's for their examples. But it's a
problem that should come up quite a bit in production code. I do need
to create everything from inside the C# code, so I'd like to avoid
coding lots of embedded SQL if possible.
It does look like a chicken or egg problem: If the SQL Server table
already exists, then it's a snap to create the dataset. But alas, it
does not exist yet (on the target installations, anyway).