Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Transferring data from SQL to SQLce

Posted on 2013-01-28
6
Medium Priority
?
408 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

618 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