sql-server-ce

SQLCE Connections: Keep them open or let them close?

北战南征 提交于 2019-12-19 08:41:21
问题 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. 回答1: You should definitely watch Steve Lasker's PDC08 session about SQL Server Compact Edition. There's a part about performance, best

Storing folder hierarchy in relational database

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 08:01:07
问题 I have objects representing folders and I'm wondering if they should be represented in the database. On the one hand it seems like the easiest way would be to not represent folder objects and just store a path value for objects contained in a folder. Problems I see with this is that you can't persist an folder whose descendants do not contain any items, which isn't too big of a deal. Also I don't have a clear idea of how to load the folder hierarchy to display (such as in a TreeView) without

Deploying SQL CE 4 to IIS 7 - Special Permissions Needed?

a 夏天 提交于 2019-12-19 06:16:06
问题 I have an ASP.NET 4 site that uses the new SQL CE 4 CTP. The site works fine locally (IIS 7.5 on Win7) and fine in Server 2003/IIS 6. It fails when deploying to IIS 7 on Server 2008. The error I get is: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) The interesting thing is if I switch the app pool user from its default user to LocalSystem, everything works great. So clearly there is a permissions problem somewhere. Long story short, does anyone know what special

SQL Compact 4.0 can't open/read sdf file

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 18:38:32
问题 I've installed SQL Compact 4.0 CTP 2 via WPI and used NUPack to add SQLCE.EntityFramework in my project. It compiles and run perfectly but I can't open the SDF file in Visual Studio 2010's Server Explorer. When I try I always receive the following message: Microsoft Visual Studio This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine. OK I've already tried to uninstall and reinstall everything. It cannot be opened in SQL

How do I share a SQL Server CE database file (.sdf) for multiple processes?

老子叫甜甜 提交于 2019-12-18 09:27:40
问题 I have a database in SQL Server CE. When connecting several applications of different computers to the database throw an exception. This is the exception: There is a file sharing violation. A different process might be using the file. type of exception is "SqlCeException". and this is my connection string : Data Source=\\server\ProductionDB\ProductionControl.sdf;File Mode=Read Write; Max Database Size = 4000 The version of SQL Server CE is 3.5 SP2 回答1: I misread your question initially, but I

How do I set Identity seed on an ID column using Entity Framework 4 code first with SQL Compact 4?

痴心易碎 提交于 2019-12-18 09:15:33
问题 I am having some problem setting the Identity Seed on the Id column in SQL Compact 4 using the code first approach. I have tried this context.Database.ExecuteSqlCommand("DBCC CHECKIDENT ('Members', RESEED, 100001"); but this is not working in Sql Compact. MyDbContext: protected override void OnModelCreating(DbModelBuilder modelBuilder) { SetupMemberEntity(modelBuilder); } private static void SetupMemberEntity(DbModelBuilder modelBuilder) { modelBuilder.Entity<Member>().Property(m => m.Id); //

Why doesn't SQL Server CE support varchar?

你。 提交于 2019-12-18 05:37:57
问题 I was creating a table in SQL Server CE and realized it doesn't support varchar. Looking this up, I found that "non-Unicode text columns (varchar, char, text) and smallmoney are not supported; although nvarchar, nchar, ntext, and money are supported" as stated at MSDN. Is this true? Why is this, exactly? It would seem that a compact database would support data types that take less bytes to store...I'm assuming it takes more space to save the Unicode characters. What is the reasoning behind

What is the number of maximum concurrent connections for Sql CE 3.5?

こ雲淡風輕ζ 提交于 2019-12-18 04:43:09
问题 as google does not deliver what i want to know, i try to ask stackoverflow :) what is the number of max concurrent connections to a sql ce 3.5 database? thanks j. 回答1: I believe the information you are looking for is the SQL Server Edition Comparison. For standard Editions - Compare Features For Compact Edition - Compare Features Edit Sorry, this Word Document is most likely what you need. Edit again The answer is 256 concurrent connections for Compact, unlimited for express. See table 1 in

SQL Server Compact 4.0 vs. SQLite

安稳与你 提交于 2019-12-18 03:00:54
问题 I'm interested in choosing an embedded DB engine for my WPF app. I would like information on how SQLite and latest SQL CE 4.0 compare. And if I should choose one over the other. Points of interest would be ORM support with EF4's CTP & NHibernate 3. Thanks in advance! 回答1: See this answer: Database functionality with WPF app: SQLite, SQL CE, other? - SQL Compact 4 has full support for Entity Framework, Linq to SQL - Includes all neccesary file for private deployment - has good tools support in

How to use Regular Expression in sql server?

不打扰是莪最后的温柔 提交于 2019-12-17 19:29:18
问题 Is it possible to make efficient queries that use regular expression feature set.I got data in my table which is not in correct format,EX:-In Title colum: Cable 180┬░ To 90┬░ Serial ATA Cable and in Id column 123234+ data in exponential format,it is possible to make queries using regular expression in Sqlserver2008. 回答1: You need to make use of the following. Usually requires combinations of the three: patindex charindex substring In response to your comment above, patindex should not