sql-server-ce

Copying large amounts of data into a SQL CE database

If I have a large amount of data in memory, what is the best way to copy it into a SQL CE table? The current technology stack is C#, ADO.net, and SQL CE. My initial idea was to do one INSERT statement for each row of data, but this is time-consuming. Is there an easier way? ...

Advantages and Disadvantages of SQLite.NET and SQL Server Compact

I have used SQLite.NET many times. It always worked fine but I have a friend that is really pestering me that I should use instead SQL Server Compact so I stayed fully in Microsoft environment. Now, I never worked with Compact, and he tells me it works fine for him, but seeing that .MDF extension gives me the creeps. No kidding. Last th...

How do I view the data in a SqlCE database on a device from visual studio?

I'm debugging an app on a Windows Mobile device and want to view the data in the SqlCE database on the device. I was told to copy the SDF file from the device onto my dev box, but is there an easier way to do it through visual studio without copying anything over? I'm using Visual Studio 2005, Compact Framework V2 and Windows Mobile 5. ...

Per user password of a sql ce database.

Is there anyway to password protect a sqlce database, per user? Say I have two users, Mary and Sally. Mary can only access her info and vis versa. Or would I have to duplicate the database for each user and give each instance it's own password. Thanks. ...

Error using Merge Replication to SQL Compact 3.5

We are getting the following error when syncing with sql server (2005 SP3): Initializing SQL Server Reconciler has failed. Try again.; The merge process could not connect to the message file from Subscriber '{F238C7BC-E13B-40E4-99F2-F11A203BD65A}:W:\http_content\Secure\SECURE_PROD\data_merge\30.18F5D9B4BCC7_B1415013-9FB7-424A-AB45-643A0...

Sql ce 3.0 Database multiuser

Im trying to access a Sql CE 2005 database on a windows mobile device from two different applciations. From the information I found online it should work but when I open the second connection I get a file sharing violation error "There is a file sharing violation. A different process might be using the file. [ \\\Program Files\xx\DB....

System.TypeLoadException in Unknown Module with SQL Server CE

Hi, I have a C# windows mobile application originally created in VS2005 that was used to create a test database. However, now that I've included the C# code into a VS2008 project and re-setup the SQL references, I receive the following error: An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module. Additio...

Best way of upgrading SQL Server Compact Edition 3.5 database?

I have a desktop application that uses an SQL Server CE 3.5 database. I can not use any other SQL Server edition. Now I'm wondering: In case of future updates to the functionality, how would I best upgrade the database (= keep current data but add new fields/tables/etc.)? If I used one of the server editions, I'd just write an upgrade s...

Using MS Synchronisation framework with J2EE webservices to provide offline .Net client application feature.

I use a glassfish server to expose (METRO / WSIT) webservices that handle entity database accesses. I would like to know if someone tryed to use MS Sync Framework with this configuration to enable offline .net client feature. Thanks for incoming anwsers. ...

SQLServerCE / Local Data Cache / Sync Framework - Insert Error

Hi, Hopefully someone can help me. I have a Visual Studio 2008 WinForms application to which I have added a Local Data Cache. The local data cache is using a SDF file via SqlServerCE and is caching a SQL Server 2008 dbase with change tracking enabled. This is working and I can do bidirectional syncs and the like. The problem I am ...

Linq to SQL : Optimizing queries with Sql Server Compact Edition

Hi I've been using Linq to SQL against Sql Server CE. Database is read only, so I can have several assumptions. In order to refrain from accessing the file system, my initial approach was to cache needed entities to application memory and using linq to objects against them. While it works well for limited queries, directly using Linq...

Generating Linq classes from a SQL Compact 3.5 database using SQLMetal

I am generating Linq classes by running SQLMetal from the command line against a Compact 3.5 database. The Compact 3.5 database is a local database cache (generated by the Sync Framework "Create Local Database Cache wizard). CE seems to support foreign keys constraints, but I am not seeing any, and SQLMetal does not generate them into th...

Drop table, Sql Compact edition

How do I drop Sqlce table from within VB Express 2008? Any help appreciated... ...

Retrieve data from WCF to store on SQL Server CE (TableAdapter)

Hello! I have a Compact Framework 2.0 app that consume a WCF service. The data that retrieve from the service will be store on a SQL Server 2005 CE. The SQL Server CE database has his own tables. I use a TableAdapter to access SQL Server CE and Insert and Select statement to store and retrieve data. Is there a better way to do it? T...

What database should I use in this VB.NET app?

My database must be updated at arbitrary intervals, manually, with new info to put on standart tables that don't require structural modifications. one app will update the database. Another app, the one I will distribute (to friends and family only, but doesn't require any security feature to it, like encrypting the database) will read th...

How data sources are linked in compiled Visual Basic .NET applications?

When I try adding a new data source to my project I get a prompt saying "The connection you selected uses a local data file that is not part of the current project. Would you like to copy the file to your project and modify the connection?" This sounds rather obscure to me, as I'm new to VB.NET and programming non-script apps in general...

C# Sql Compact text query on binary column

I was wondering if anyone knew how to compile a text query for sql compact that goes like this : command.CommandText = "SELECT * FROM tableName WHERE id = binary_Data" The id column is a 32 byte binary column that is indexed and "binary_Data" is the binary data to compare to, but I am not sure how to get a "binary_Data" into the text ...

Open sdf database in Visual Studio 2008

What do I need to open sdf database in Visual Studio's 2008 server explorer? I've installed Microsoft SQL Server Compact Edition 3.5 but Visual Studio seems to be unaffected by that installation. ...

Pass current transaction or use DependentClone?

I have a WinForm application which uses SqlServer CE 3.5 as database. I use typed dataset queries for db operations. I need to use transactions for this operations. The problem is, they're scattered across different assemblies. My question is, what should I use to run all of them in a single transaction? Here's an example operation: //t...

What's the most efficient way to store objects in a SQLCe Database?

I need to increase the performance of a compact framework application which uses a SQLCe database to persist cached objects between sessions of the application. Currently, objects are serialized into XML and stored in a SQLCe database, but having run a profiling tool it seems that there is quite an overhead in doing this. I was thinking ...