sql-server-ce

SQL Express Edition, SQL Compact Editin and SQLCMD for learning purpose

Hi, I want to learn programming in SQL from some SQL tutorial sites of which I heard of here but I need some environment for executing query's. I think I have both SQL CE and SQL EE installed on my computer but I have some doubts about these DBMS and I don't know exactly how to use SQLCMD utility so I hope someone here will have time an...

Data Access Layer with Enterprise Library in Mobile Applications

How can I use Enterprise Library to do a Data Access Layer in c# for Sql CE and .NET Compact Framework? I haven't found clear examples. I would like to learn Enterprise Library but any example will be appreciated. ...

AssertionFailure: "null identifier" - FluentNH + SQLServerCE

The code fails at session.Save(employee); with AssertionFailure "null identifier". What am I doing wrong? using FluentNHibernate.Cfg; using FluentNHibernate.Cfg.Db; using FluentNHibernate.Mapping; using NHibernate; using NHibernate.Cfg; using NHibernate.Tool.hbm2ddl; namespace FNHTest { public class Employee { public vi...

how to open *.sdf files ?

i used to open sdf (sqlCE) files with visual-studio ?? or sql-server ?? i really don't remember. now i can't open this sdf file with what program do i need to open it ? ...

Set password of an existing sql ce database (per Code)

Hello, I am working with SQL Server and I want to set the Database password of a SQL Server CE Database (*.sdf). I found the Command how I can create a new database with password: CREATE DATABASE "secure.sdf" DATABASEPASSWORD '<enterStrongPasswordHere>' But I want to set a password of an existing db. ...

Copy a table from an SQL Server CE 3.5 database to another in Visual Studio 2008?

How can I copy a table from an SQL Server CE 3.5 database to another (also CE database) in Visual Studio 2008, using the design tools? Note: When right clicking on a table there is a "copy" command, but I couldn't find any "paste" command so far... ...

Problem using SqlServerCe in .Net 4.0

SqlServerCe doesn't seem be supported in .net 4.0. But since I needed an embedded database in my application, I gathered all the necessary 3.5 dlls and included them so that my wpf application could use SqlServerCe as its embedded database. The application works on my development machine, but now that I've created an installer, and am i...

Linq to SQL and SQL Server Compact Error: "There was an error parsing the query."

I created a SQL server compact database (MyDatabase.sdf), and populated it with some data. I then ran SQLMetal.exe and generated a linq to sql class (MyDatabase.mdf) Now I'm trying to select all records from a table with a relatively straightforward select, and I get the error: "There was an error parsing the query. [ Token line nu...

Visual Studio 2008: Don't deploy SQL Server Compact 3.5 when debugging

Hi, I'm using VS2008 to create a Compact Framework application for a Windows CE 5.0 device (Datalogic Kyman). I'm using SQL Server Compact 3.5 in my application. However, I'm debugging on a Kyman that still has Windows CE 4.2 installed (attached via USB using Mobile Device Center). My problem: VS2008 does not recognize that SQL Server...

WebSharingAppDemo-CEProviderEndToEnd Queries peerProvider for NeedsScope before any files are batched to the server. This seems out of order!?

I'm building an application based on the WebSharingAppDemo-CEProviderEndToEnd. When I deploy the server portion on a server, the code gives the error "The path is not valid. Check the directory for the database." during the call to NeedsScope() in the CeWebSyncService.cs file. Obviously the server can't access the client's sdf but what ...

exception with Linq to SQL using sdf file

Hi, I've set up a project with an SDF local database file and am trying to access it using an LINQ To SQL (".dbml") file. I have used the connection string provided by the sdf file and can instanciate the object with out a problem: thisDataContext = new MyDataContext(GetConnectionString()); However, whenever i try to access any inform...

How to edit datagridview using SqlCeDataAdapter?

I've a frmEdit with datagridview that's bouned to this: string sqlqry1 = "select p_Name from Items where p_Id=" + p_Id; using (SqlCeDataAdapter a = new SqlCeDataAdapter(sqlqry1, conn)) { DataTable dt1 = new DataTable(); a.Fill(dt1); dataGridView1.DataSource = dt1; } How to ed...

Increase the size of sql compact 3.5 .sdf file using C#

I'm using Sql Compact3.5 as my DB with C# .NET what is the maximum size of sdf that I can give??? Is there any way to programatically increase the maximum size of the sdf file??? if so how??? ...

DateTime problem in sql compact

I'm using Sql Compact3.5 as my DB with C# .NET In different systems i'm getting the datetime format differently. In an Windows XP it's retrieving the datetime in the format : MM-dd-yyyy HH:mm:ss and in Media center it's retrieving in the format : MM/dd/yyyy hh:m:ss. Is there any way to make the datetime format free from culture or can i ...

Slow Update/insert into SQL Server CE using LinqToDatasets

I have a mobile app that is using LinqToDatasets to update/insert into a SQL Server CE 3.5 File. My Code looks like this: // All the MyClass Updates MyTableAdapter myTableAdapter = new MyTableAdapter(); foreach (MyClassToInsert myClass in updates.MyClassChanges) { // Update the row if it is already there int result = myTableAd...

Attempted to read or write protected memory-Sql Compact and .NEt

I've tried to run the application in two situations: with SQL Server compact edition (3.5) installed and one without. When SQL Server Compact edition isn't installed, I get the following error: Exception :Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Inner Exception : ==========...

Filtering by date with DataTable.RowFilter while ignoring time

How do I filter for records on a DataTable which are on a certain date? I've tried plain [datecol] = #11 March 2010# and CONVERT([datecol],'System.DateTime') = #11 March 2010#. With no luck. MSDN: RowFilter Expression Syntax Solution [datecol] >= #11 March 2010 00:00# AND [datecol] <= #11 March 2010 23:59:59# ...

Windows mobile Compact Framework SqlCeConnection

I'm hearing that is better to have one connection open upon app start up and closing it when the app shuts down. What kind of issue can occur having multiple connections ? Any articles out there that it is best practices to have one connection? What are your experience with sql ce? ...

Opening an SQL CE file at runtime with Entity Framework 4

I am getting started with Entity Framework 4, and I an creating a demo app as a learning exercise. The app is a simple documentation builder, and it uses a SQL CE store. Each documentation project has its own SQL CE data file, and the user opens one of these files to work on a project. The EDM is very simple. A documentation project is ...

Problem accessing SQL Compact database file on Vista 32 bit

Hi - I'm building a C# Winforms / .NET 3.5 / Visual Studio 2008 application that uses SQL Server Compact 3.5 SP1. After building a setup / msi project and deploying the app on a clean XP machine it works fine. However when I install it on a Vista 32 bit machine, I get the error below: System.DllNotFoundException: Unable to load DLL 'sq...