Before I go on a major coding mission, I' need a bit of advice regarding database comparisons.
I have one SQL 2000 server that contains two database's:
CLIENTINFO
CLIENTINFOnew
The second db contains new tables and new fields.
Now, I'm planing on using ADO to loop through the sysobjects table to ascertain which new tables need adding (then add them). I know I can do this, as I have tested this method.
What I don't know how to do, is the same for the fields of each table e.g. check old database's 'address' table against the new database's 'address' table, establish that the new field 'postcode' needs adding, then add it.
So, a couple of Q's...
1) am i going about the whole database comparison in a rather gruesome way? i.e. is there an easier way?
2) If I am going about it the right way, where can i get column info for a table?
Ultimately, I'm trying to create an easy way to supply db structure updates to clients, whilst retaining existing data, without me scripting the changes! (I'm a lazy devil!)
Thanks,
------------------------
Hit any User to continue
I have one SQL 2000 server that contains two database's:
CLIENTINFO
CLIENTINFOnew
The second db contains new tables and new fields.
Now, I'm planing on using ADO to loop through the sysobjects table to ascertain which new tables need adding (then add them). I know I can do this, as I have tested this method.
What I don't know how to do, is the same for the fields of each table e.g. check old database's 'address' table against the new database's 'address' table, establish that the new field 'postcode' needs adding, then add it.
So, a couple of Q's...
1) am i going about the whole database comparison in a rather gruesome way? i.e. is there an easier way?
2) If I am going about it the right way, where can i get column info for a table?
Ultimately, I'm trying to create an easy way to supply db structure updates to clients, whilst retaining existing data, without me scripting the changes! (I'm a lazy devil!)
Thanks,
------------------------
Hit any User to continue