sql-server-ce

How Convert SQL CE 3.5 database to SQLite

百般思念 提交于 2019-12-04 09:28:11
问题 I started a project using SQL CE 3.5 in Visual Studio 10. But now I found out that the database is very slow. I did some testing on SQLite and thi is much faster. Is there a way that I easily can convert de SQL CE 3.5 (sdf) database to SQLite? 回答1: I have a tool to "dump" an entire SQL Compact file as SQL script, that you can then run against a SQLite db - http://exportsqlce.codeplex.com 回答2: Export CSV file(s) from SQL CE, import into SQLite, or Use ODBC to connect to both databases and move

How to deploy SqlCe Database into isolatedStorage for windows phone

↘锁芯ラ 提交于 2019-12-04 08:59:43
say, I want to use an existing SqlCe Database which HAS data in it. I am not sure which is the best way to do it. 1) here is the normal way to create a SqlCe Database for Windows phone using (CountryDataContext context = new CountryDataContext(ConnectionString)) { if (!context.DatabaseExists()) { // create database if it does not exist context.CreateDatabase(); } } But this Database has data in it , so I dont want to create it. I want to deploy it or store in in isolatedStorage. How should I do it ?? I want to use the data already in the database. Thanks You can include the database file as

Is SQL Server Compact Edition a sensible alternative to SQLite?

血红的双手。 提交于 2019-12-04 07:49:44
What are the differences, other than a file size restriction in SQL Server Compact, and Windows only usage? andyp I've found a couple of questions and some blog posts relating to this. A small comparison of their memory usage can be found here . 来源: https://stackoverflow.com/questions/3301370/is-sql-server-compact-edition-a-sensible-alternative-to-sqlite

Windows Mobile Synchronization Error

送分小仙女□ 提交于 2019-12-04 07:41:12
I am new to Windows Mobile development and have been investigating methods to synchronize data between PDA's running WM6 and a SQL Server 2005 Database. After some research I decided to go with Windows Synchronization Services. I started by looking at the sample: SyncServicesForDevicesSample I downloaded and installed all the prerequisite software outlined in the readme including: Visual Studio 2008 Professional SP1 SQL Server Compact 3.5 Service Pack 1 (SP1) Synchronization Services for ADO.NET 1.0 (devices) When I load the sample I noted that the System.Data.SqlServerCe.dll reference in the

Correct DateTime format in SQL Server CE?

风流意气都作罢 提交于 2019-12-04 07:21:02
I have a C# DateTime class and wanted to know how I need to format it in a SQL Server CE query to insert it into the database, I was hoping to have both the date and time inserted in. Currently when I try variations thereof I get invalid format exceptions. Current format I'm using is: dd/MM/yyyy , was hoping to do something like dd/MM/yyyy hh:mm:ss . The way I'm trying to do the insert is like so: ( ( DateTime )_Value ).ToString( "dd/MM/yyyy hh:mm:ss" ) Obviously hh:mm:ss isn't working, if that isn't there dd/MM/yyyy executes successfully in the query. I've tried a few formats including what I

How to decipher/interpret the contents of a file as shown in a Hex editor?

醉酒当歌 提交于 2019-12-04 07:02:54
问题 In connection with this question, I downloaded a Hex Editor to see just what values my SDF file contained in a certain location, which is supposed to tell me what version of SQL Server CE the SDF file was created with. I got the following info: SQLCE Version 2.0: 0x73616261 3.0: 0x002dd714 3.5: 0x00357b9d 4.0: 0x003d0900 ...from this page. But I don't know what I'm looking at; I don't know if I'm looking in the wrong column or row, and I know that once I do know where I need to be looking,

SqlCeConnection relative path for connection string fails

百般思念 提交于 2019-12-04 06:54:22
问题 SqlCeConnection cs = new SqlCeConnection(@"Data Source=C:\Users\Shahid\Documents\Visual Studio 2010\Projects\DarUlIfta\DarUlIfta\DB.sdf"); This works fine with complete path But only problem I'm facing when I use relative path my database stop saving data into it. While at run time it works fine when I close the app there is noting in the database. What should I do? 回答1: Your connection string is to a database inside your project source folder. That is not right; when you deploy software you

Windows Phone 7 SQL Server CE rowversion

倾然丶 夕夏残阳落幕 提交于 2019-12-04 06:43:37
问题 I had a problem when updating a table in SQL Server CE on Windows Phone 7. When I would call submit changes the app would close without any exceptions or errors. Visual Studio even remained running. Removing the rowversion column fixed the problem. I've looked around and not sure if I'm missing something but is there anything special one needs to do when using a rowversion column? Here are the attributes for the column. I created a simple table when trying to figure this out. It has 3 columns

can i connect to a remote SQLCe database?

北城以北 提交于 2019-12-04 06:37:39
问题 We've got an SQL Ce database on a remote machine and we're trying to get a reporting system (using custom LINQ queries) via c# to connect to the database in shared read mode. At this point we're getting an exception "There is a file sharing violation", even when the database has no other conections. Our sql connection string appears thus: using (SqlCeConnection conn = new SqlCeConnection( "Data Source=\\\\telemetry\\C$\\users\\usermetrics.sdf; File Mode=shared read;)) { conn.Open( ); // =>

Why is this SQL Update failing (“column name is not valid”)?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 06:15:42
问题 I've got a SQL Server CE table like so: ...and I'm trying to update its solitary record like so: update workTables set fileType = "INV" Yet I get: Why? UPDATE Please see a related question here 回答1: Your query should be: update [workTables] set [fileType] = 'INV' Note: single quotes ^^^^ 回答2: Here check Microsoft support for yor error. http://support.microsoft.com/kb/825392 This is from the site: SYMPTOMS: When you run a query on a Microsoft SQL Server 2000 Windows CE Edition version 2.0