Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm writting an application that requires user registration using fingerprints, pictures and other data supplied by the user. This is to hav its database and would be installed on many computers. And another application, the main application that does the rest of the work. Now i want to transfer the data from the registration database to the main application database from any of the computers from a .sql script produced as backup from the registration apps. So my question is, how would i do this, because if i try normal restore, it overwrites the existing data in the database. Please i need some help.
Posted

I my opinion you are better of using SMO in that case, you somehow save the last
date/time of the entries transfered or another field that help for the next time that the manager click on the transfer button. Here is a start on the smo API http://blogs.msdn.com/b/olivier_pieri/archive/2004/12/06/275825.aspx[^]
the sample show just how to connect to SQL, then go from there accessing the tables from the registration db and write the data on the main db.
You can read more or get more SMO samples from Microsoft.
Good Luck!
 
Share this answer
 
Emejulu,

Your question requires a lot more explanation. What SQL server version do they have? Are the tables from the registration database the same layout as the Main database?, do you want a automatic job that wakes up and copy data every night from one db to another?
do you want to use a SSIS package? do you want to use a shell script to copy the data? you can use bcp to extract data to a text file and bcp to import it at the main db. There are many ways to transfer data from one db to another.

cocis.
 
Share this answer
 
Comments
Emejulu JVT 8-Jan-13 12:46pm    
I'm using SQL Server 2005 and the database structures are the same. The update has to be initiated manually by the admin by button click. Any package available for this job would be welcome because i'm short of ideas. Thanks a lot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900