index > SQL Server Everywhere Edition > Extracting Data from SQL CE SDF file

Extracting Data from SQL CE SDF file

Hi,

I have written application for Pocket PC it stores data on SQL CE database with extension .sdf. I have added data to the table and synchronised to the SQl server. I got the data, then unfortunately i deleted the data in SQL Server, I want to extract the data again from .SDF file of Pocket PC.

Is this possible if not then how can i get the data from SDF to SQL Server

Its very urgent and waiting for early reply to following mail address
prashanthk@mmi.ae

Regards,
Prashanth
naveen73
there are a couple of options Prashanth:

1.  write a simple smart device program that connects to the database and table by table writes out the rows in those tables to CSV files on device.  copy the CSV files to the server and import into SQL Server.

2.  there are third party tools that can connect to a SQL CE .SDF file on device and query their contents.  DesktopSqlCe is available for download here:  http://www.primeworks.pt/

3.  convert your SQL CE database to a SQL Mobile database and connect to it from Visual Studio 2005 or SQL Server 2005 Management Studio (then select out your records into another SQL Server DB).

-Darren Shaffer



.NET Compact Framework MVP
Darren Shaffer

Darren,
Can you tell me how to move an .sdf file from sql ce to sql server. I want sdf table data to append with SQL Server's existing data. Is it posible?

Thnx

Raj




Try without Commitment never succeeds
Raja Ram Singh

With SQL CE, you can't do anything with the .SDF file on your server.  You need to get the data out of SQL CE while it is still on a device or emulator and transport the data (not the .SDF file) to your SQL Server.  I listed the options for this - it would be very quick to simply write a program that selects out the data from SQL CE and saves it in CSV files.  You can then copy the CSV files from your device to your server and then import the data into SQL Server directly from the CSV files.  A third party tool like RemoteSQLCE will also handle this for you.

-Darren

 




.NET Compact Framework MVP
Darren Shaffer

Darren,

Thanks a lot for your suggestions, I was looking for tools to analyse sdf databases on a Windows XP environment for a long time!

- Jeroen Boiten




Developer @ www.wisdom.nl
Jeroen Boiten

Hallo, I'm Gabriel and I'm working with .NET 2005 and Pocket PC 2003.

I'm very very interested of first point, the one with the CSV export.Do you have an exemple ?

I'm very time stress.

Gabriel_M
reply 6

You can use google to search for other answers

 

More Articles

• Connecting Database Engine (SQl server 2005 file .*mdf) from Win ...
• Import data to SQL Server Mobile
• SQL CE Err 80004005 "Unspecified Error"
• SQL Mobile performance/size problems with WM5 device
• Exception thrown: database file cannot be found
• Help me!emergency!
• @@IDENTITY in code
• access SQL2005 MOBILE database in a VS2003 mobile app
• SQL Mobile support for CE 4.2
• Can't find PInvoke sqlceme30.dll
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• What is necessary to create SDF-Files on
• ?Data transfer Pocket PC <--> Desk
• System.AccessViolationException in Syste
• info about sql server 2005 everywere
• Transform??sql server mobile edition dat
• Create New SQL Server Mobile Edition Dat
• rda localconnection
• Why I can't connect sql server 2000 with
• SQL Server Mobile subscription problem
• I need some information regarding Window
• unable to connect to SQL Everywhere in V
• SQL Mobile 2005 NVarChar Truncation Prob
• Emulator Error to replicate data on SQL
• Could not load type 'System.Data.SqlServ
• Regarding MergeReplication-Tutorial

Hot Articles

• Using SqlCeEngine to verify/Restore a da
• InvalidProgramException on Adapter.Fill
• How do you use the upgrade.exe for sqlce
• Change database attributes with SQL?
• Using Push in RDA for sync the data fro
• Replication Error 28559
• Subset of TSQL supported by SQL Server m
• GUIDs using NEWSEQUENTIALID() on SQL Ser
• rda localconnection
• Top Instruccion
• When will we get a Management Studio for
• I am not sure whether I can use sql mobi
• What directory would be best to store th
• SQL Everywhere, ntext & ADO Classic
• Problem using SQL Server Mobile 2005 wit

Recommend Articles

• SQL Everywhere - Can't connect from VS.N
• RDA Push Command Failing ...
• Accessing SQL Mobile Databases in VB2005
• About SQL Mobile Server
• Return Top row from a ResultSet - SQL Se
• Maximum length sql statement that can be
• SQl Server CE database connection issue
• SQL Server mobile installation
• BadImageFormatException in tablet applic
• Smart Client - Data Centric - SQL 2K to
• (SQL Mobile)Can SELECT, but cannot INSER
• Accessing Mobile SQL Databases in VB2005
• Problem with Windows Live Messenger
• Id getting generated differently
• Error when "SELECT" statement