more documentation for working with typed datasets?

S

Sam Jost

I'm just evaluation typed dataset's, and can't find much information how to
use them with a database.

The things I'd need to know are:
- What will happen if the database and the dataset do not match? How can I
catch this?
- When I will need new fields in my dataset and database, I can change the
dataset quite ok, but how do I migrate the database (at the customer)
programmatically?

Maybe someone can point me to a page explaining a bit more about using typed
datasets in practise?

thanks,
Sam
 
C

Chris Bilson

Sam said:
I'm just evaluation typed dataset's, and can't find much information how to
use them with a database.

The things I'd need to know are:
- What will happen if the database and the dataset do not match? How can I
catch this?

There are enums for how a data adapter handles these things:
MissingSchemaAction and MissingColumnAction.
- When I will need new fields in my dataset and database, I can change the
dataset quite ok, but how do I migrate the database (at the customer)
programmatically?

You can't. Using typed datasets means you are going to "schema-bind"
your code. Once the code is compiled, it will not be able to deal with
schema changes in the data it gets back from the database.
Maybe someone can point me to a page explaining a bit more about using typed
datasets in practise?

Essential ADO.NET was what got me going. I hear Bill Vaughn's book,
"ADO.NET Examples and Best Practices for C# Programmers" is good. I am
waiting for his ADO.NET v2 book to come out.
 
S

Sam Jost

Chris Bilson said:
You can't. Using typed datasets means you are going to "schema-bind"
your code. Once the code is compiled, it will not be able to deal with
schema changes in the data it gets back from the database.

I meant it the other way round:
you see, I write v1 of my app, deploy it to 1000 customers.
Some time later I write v2, which needs a change in the database. I
change my testing db, change my typed dataset and now I need to deploy
the new thing.
How would I go on about programmatically migrating the db at the 1000
customers? And I don't know what DB software (sql server, mysql,
oracle) they are using since they can customize which one they use.

How would this be done?
Essential ADO.NET was what got me going. I hear Bill Vaughn's book,
"ADO.NET Examples and Best Practices for C# Programmers" is good. I am
waiting for his ADO.NET v2 book to come out.

I'll have a look at these, thanks!

Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top