Copy SQL database to another

naevhel44

New member
Joined
May 23, 2009
Messages
1
Programming Experience
1-3
Hi, i made a simple inventory system using MSSQL as back-end. I installed it to different computers which are not connected(home computers of members)

I want to reconstruct the program so that if someone updates(update/add records) his/her database, he/she can save that update into a file and save it into a flash drive, so others can copy it and easily update their database at home without manually updating their database.

Is there any function that i can use to import/export the updated record into a file? I don't know how to approach this problem coding.

thanks in advance :)
 
You could put the data into a DataTable or DataSet and then call WriteXml to save it to an XML file. You can then ReadXml that back in at the other end and save it to the database.
 
Additionally I believe SqlBulkCopy can be used to efficiently copy SQLServer databases and the majority of databse systems support execution of direct statements such as this one from oracle:

CREATE TABLE local_caopy AS SELECT * FOM remote_table@remote_db


The @ specifies a database link. I don't know what the sqlserver corollorary is
 

Latest posts

Back
Top