Click here to Skip to main content
Rate this: bad
good
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 5:49am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Emejulu JVT at 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
good
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 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!
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2014
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