Click here to Skip to main content
12,885,268 members (42,953 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# SQL MySQL
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 8-Jan-13 4:49am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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.

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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[^]
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!

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100