开发者

Best method for transferring data between two SQL databases

I'm developing a project for gathering customer feedback using a Samsung Q1 Ultra, a cheap touchscreen PC. The project consists of two parts: a PC based application that builds the survey and stores the info on an SQL Server, and a survey viewer on the Samsung device which downloads survey data from the SQL Server and stores it on a SQL Server Compact 3.5 database.

My question is, how best can I transfer survey data from the SQL Server to the handheld device's database? Writing a tonne of code to copy data from one database to another seems overcomplicated - is there a handy function or somesuch that I can use to copy开发者_Python百科 data from identical tables on these two separate databases?

Any help, suggestions greatly appreciated.

Cheers


Since you are copying from one device to another, you're going to need to do some sort of transfer system (replication, export/import, etc.) obviously.

My initial suggestion would be to have the handheld devices just access the main database on the server remotely... This means that each of the individual handheld devices (should you add more than one) would be working from the same data. Other than that approach, I would suggest something like this (after adding a linked server entry):

select * into targetTable from [sourceserver].[sourcedatabase].[dbo].[sourceTable]

A quick search on Google actually returned a question similar to yours here on the site.


SQL Server Replication might work for this. That MSDN section has tutorials, how-tos and walkthroughs. It isn't all that difficult to understand, but there is some setup. However, once you're done, you can basically put it on automatic pilot.

This article is a pretty good overview.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜