sql-server-ce

Connecting to a SQL Compact file (.sdf) using an ADO connection in Delphi

与世无争的帅哥 提交于 2019-12-01 09:30:42
问题 I'm attempting to use a local .sdf file as a means of temporary storage should the main database be unreachable. I have the .sdf file, but when I try to set it to the file it seems to not at all know if the .sdf exists. The current connection string I have currently is: Driver={SQL Native Client};Data Source=C::\users\username\desktop\file\MyData.sdf;Persist Security Info=False and for the Provider it generated for me: Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5 When I try to use the connection

Is possible to create a database (Sql Server compact) on a given path if we use Entity framework with code-first approach?

泪湿孤枕 提交于 2019-12-01 08:00:36
I'm a bit confused about Entity framework, I would like to use code-first approach; infact I would like to write how my database tables are composed through class definition. The main problem is that I need to create a database (or open it) by choosing dinamically it's path (the user can choose what database to open and can create new one when he wants). I've chosen Sql server compact to achieve this, however I still don't understand how to use code-first approach for this situation because I don't understand how to choose where database should be created with code-first approach, if is

Help me with this SQL Query

随声附和 提交于 2019-12-01 07:29:53
问题 I've got a SQL Server CE 3.5 table ( Transactions ) with the following Schema: ID Transaction_Date Category Description Amount Query: SELECT Transaction_Date, SUM(Amount) FROM Transactions GROUP BY Transaction_Date; I'm trying to do a SUM(Amount) and group by transaction_date just so I can get the total amount for each day but I want to get back values even for days there were no transactions so basically the record for a day with no transactions would just have $0.00 for amount. Thanks for

Entity Framework SaveChanges does not save data

99封情书 提交于 2019-12-01 06:30:18
问题 using (var db = new dbEntities()) { var dbUser = (from u in db.Users where u.Id == Id select u).First(); dbUser.LastName = LastName; dbUser.FirstName = FirstName; dbUser.GroupId = GroupId; dbUser.VoicesCount = VoicesCount; db.SaveChanges(); } This does not save any changes to the database. But there are no exceptions, either. Why? UPD: Ok, I tried it also for SQL Server CE and nothing changes. It doesn't save the changed data. 回答1: Look in you bin/debug folder for a copy of the database, it

SQLCE Connections: Keep them open or let them close?

笑着哭i 提交于 2019-12-01 06:03:00
Keeping performance on a mobile device in mind, what do you think is the best approach with an SQLCE Connection. Keep it open for the duration of the application or let it close whenever a call to the database is needed. Obviously this depends a little on the nature of your application however I'm curious to hear what the group has implemented and why. You should definitely watch Steve Lasker's PDC08 session about SQL Server Compact Edition . There's a part about performance, best practices and his own benchmarks (~37:00). In short, keep it open, try to reuse commands, and use SqlCeResultSet

Is possible to create a database (Sql Server compact) on a given path if we use Entity framework with code-first approach?

拥有回忆 提交于 2019-12-01 05:39:00
问题 I'm a bit confused about Entity framework, I would like to use code-first approach; infact I would like to write how my database tables are composed through class definition. The main problem is that I need to create a database (or open it) by choosing dinamically it's path (the user can choose what database to open and can create new one when he wants). I've chosen Sql server compact to achieve this, however I still don't understand how to use code-first approach for this situation because I

jdbc driver for Microsoft SQL Server CE(Compact Edition) 3.5

孤人 提交于 2019-12-01 05:33:25
I want to be able to explore the contents of a DB for this version of the DB. I was thinking of using the Squirrel DB client (which needs a JDBC driver). Therefore, I'm looking for a JDBC type 4 driver for SQL SERVER 3.5. Can somone point me to a FREE OR open source or trial ware ? If no JDBC driver, how do MS developers explore a given .SDF file ? Thank you, BR, ~A There is a free program called SQLCeEditor that does it. I'd still like a JDBC driver though since that would make it easy to use with Eclipse and Java. Have you tried SQL Server Management Studio Express ? You can access SQL

I don't have SqlServerCe assembly?

耗尽温柔 提交于 2019-12-01 05:14:13
I'm working on a simple WinForms app that uses an .sdf database to store data. I saw this interesting post on how to handle multithreaded access, which seemed useful. Problem is, I can't find the System.Data.SqlServerCe assembly. I installed the Sql Server Compact 3.5 SDK, but that reference still doesn't show up in my .NET assemblies list when I go to add the reference. What am I missing? I'm using Visual Studio 2010 Ultimate on Windows 7. Mark Hall Go to "Tools" and select "Choose Toolbox Items..." and select .Net Framework components and see if any of the SqlServerCe components shows up,

Using MS Sync Framework to synchronize two SQL CE Dbs

不羁岁月 提交于 2019-12-01 04:12:00
I'm just working into the Microsoft Sync Framework. It looks quite easy to sync a local SQL CE 3.5 Database with a remote SQL Server 2008 using the SqlSyncAdapterBuilder and SqlServerChangeTracking. Unfortunately, syncing two SQL CE 3.5 Databases doesn't look that easy... The documentation is very sparse, and I don't realy know how to get started here. My concrete scenario looks like the following: I have one central SQL Server 2008. Multiple clients are connected to this server (some of them only partially). Those (partially connected) clients are using multiple applications (maybe running

The limit of SQL CE 4.0

时光毁灭记忆、已成空白 提交于 2019-12-01 02:17:20
I'm planning to use SQL CE 4.0 in a small but production web site and I'd like to know how much load SQL CE 4.0 can handle: Number simultaneous connections, Number of rows per table, and The total DB size. Something that might be useful to you is Scott Guthrie's blog post on Wednesday 12 Jan 2011 regarding the latest version of SQL CE and its VS2010 integration: VS 2010 SP1 and SQL CE To cherry pick a couple of quotes: SQL CE can be used for development scenarios, testing scenarios, and light production usage scenarios. Starting with SQL CE 4 you can use it in a web-server as well. For high