Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating table structure from one database to another

Status
Not open for further replies.

FoxKid

MIS
Jun 8, 2003
92
IN
Hi all,
I am generating a software where I have made one database. I want to know how can I do the following task.
I have make to identical database. In one database I am adding new table or modifying it and in the second database data is been entered in my company.
What I want to do is that...
1. When I update a database it should check all the table structure one by one and do all the modification I have done in first database.
2. Create a new table with same name and structure in the second database if it doesn't exist in the second database.

How can I do this with no curroption in the data of the second database?

Thanks and regards
 
FoxKid

In might not be your solution but look at faq184-3774, a lot of the techniques used in the faq will be usefull for you.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Mike,
Thanks for your reply,
But when I copy those codes in temp.prg and run it it ask to select a database and when I select my database it gives an error "File 'table1' doesnot exist". There is no file table1 as such in that database. Then why is it searching for that. It is giving this error on this line....


Use (m.lcTableName) In 0 Shared Alias SourceTable


I was thinking that if this program will also run then atlease I will get the list of both the database in a dbf and I will compare it and I will get the changes I have done easily.

Thanks and Regards
 
FoxKid

It sounds like you may have a reference to a table that is no longer in the database, but the reference is still there. Try validating the database.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Mike,
I have validated my database again and now also the same error is coming.

Thanks and regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top