Automatically keep database and dataset schema in sync

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

John

Hello,

I am working on a project with a strongly typed dataset...I have to make
alot of changes to it as I change the database schema. Its tedious, error
prone and time consuming updating it manually as I have to do everything
twice...

Is there a way I can automatically regenerate it from the database via
commandline? after all its just an exact duplicate? and drag and drop does
it...

I figured XSD.exe could do this for me, but I cant get an xsd from my
database (access2007). Has anyone tried this? I spent many hours searching
on google to no avail so im starting to think its not really possible...not
without multitudes of hours being spend on crafting something to do it
anyway...

Thank you very much to anyone who has any ideas..
John Sheppard
 
Yes, you can do this with a data adapter and the FillSchema method. But
VB is not the group you want to ask this, ado.net is where you want to be.

Tom
 
John said:
I am working on a project with a strongly typed dataset...I have to make
alot of changes to it as I change the database schema. Its tedious, error
prone and time consuming updating it manually as I have to do everything
twice...

You'll need to use a real OR/M mapping tool... i.e. LLBLGen Pro. Whenever
the database changes, you would regenerate your data layer, which would be
updated to the latest schema.

Otherwise, it's a manual process with typed datasets.
 
Thanks Tom,

Its a strongly typed dataset so I dont want it done at runtime.

Sorry I will try over at the ado.net group...so many groups... :(

Thank you
John
 
Yeah I would rather be using LLBLGen, unfortunatly the project is quiet a
way in and as much as id really love to ditch typed datasets I dont see us
changing.

Hmmm, maybe I'll write an addin that does it or something, surely this is
something fairly common amongst people using typed datasets...

Thanks for your help
John Sheppard
 
Back
Top