?
Solved

Transferring data from SQL to SQLce

Posted on 2013-01-28
6
Medium Priority
?
401 Views
Last Modified: 2013-12-27
This question was answered before but the link showed in the answer gives a 404 error. I full copy this question asked by JedNebula.

I am currently developing an application for a mobile device in VB - Visual Studio 2008. I am just looking to see what my options are for transferring data from an SDF database file on the device to a SQL 2005 live database on the local company's network (i.e. not going to be external to the building) and visa versa. The data will be only a couple of tables - one of which will contain approx 200k rows.

I have done some Google searches and found that 'replication' is an option although this seems to require IIS being setup and a web address being passed in to the object's properties - even if it's a local sync. I'm not sure, but does this also require the full version of SQL being installed as opposed to just the express version?

I have also explored the SQLClient.SqlDataReader and SQLServerCE.SqlCeCommand method by looping through all the rows. - Obviously this is very slow.

I'm just looking to know what my options are before I go too far down one path&
0
Comment
Question by:BemboX
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 38827512
Is this a one time deal, or you want something like replication where the data is synced all the time?
0
 

Author Comment

by:BemboX
ID: 38827537
It's a one time deal. I need to transfer data from sql server to sqlce, do some work offline using handhelds and then, after a few hours, transfer data from sqlce to sql server. Next day, again and so on.
0
 
LVL 48

Assisted Solution

by:Mikal613
Mikal613 earned 600 total points
ID: 38827560
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 16

Expert Comment

by:hjgode
ID: 38838304
Here is an utility to convert SQL Server data to SQL Server Compact files: http://www.codeproject.com/Articles/25685/SQL-Server-to-SQL-Server-Compact-Edition-Database

sql compact convert
0
 

Author Comment

by:BemboX
ID: 38877869
I want to copy only some fields from some tables using a query. Is any way to do that using VB (visual studio 2008)?
0
 
LVL 16

Accepted Solution

by:
hjgode earned 900 total points
ID: 38879291
Hello

I assume using VB code and iterating to all rows of a table to copy it using SqlClientCE and SqlServerCE will be slower than doing it with the above tool and then deleting the unneeded data afterwards. This is valid if that is a one time convert.

If you need to update the SQLServer data periodically with the SQLCE data, using Replication or SQLClientCE and SQLServerCE is the only option and is only slow on first replication.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question