Solved

Transferring data from SQL to SQLce

Posted on 2013-01-28
6
400 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 200 total points
ID: 38827560
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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 300 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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
If you use the Google Now Launcher, as an aftermarket add on, have a Samsung Note 5 and are worried about power consumption be wary of using the ultra power saving mode.  Here is what happened to me when I made the mistake of trying this out...
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

696 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