sql-server-ce

How to convert row to columns?

非 Y 不嫁゛ 提交于 2019-12-06 15:09:30
问题 I have the below table: PROCESS ID VOUCHER DATE CATEGORY_ID PROJECT AMOUNT ----------- ------------ ------------ ------- ------- 1001 12/03/13 Miscellaneous pnr 1000 1001 12/03/13 Miscellaneous pjk 2000 1002 20/07/13 Local Travel pnr 3000 1002 20/07/13 Local Travel npk 3400 1003 29/09/14 Miscellaneous jpg 1000 1004 23/10/13 Local Travel pnr 2000 1005 24/10/13 Miscellaneous pnr 1000 1005 24/10/13 Local Travel pnr 1000 In the interface I will give VOUCHER DATE as between some date e.g., 20/01

Cannot save to database or retrieve (right info) from it

耗尽温柔 提交于 2019-12-06 13:39:30
I am saving data to the database "successfully", using: try { // Save the new Client now. Profile profile = new Profile() { Salutation = Salutation, FirstName = FirstName, MiddleName = MiddleName, LastName = LastName, Gender = Gender, DateOfBirth = DateOfBirth, CompanyName = ClientCompanyName, StreetAddress = StreetAddress, Suburb = Suburb, PostCode = PostCode, State = State, Country = Country, ABN = ABN.ToString(), ACN = ACN.ToString(), TelephoneNumber = TelephoneNumber, MobileNumber = MobileNumber, EmailAddress = EmailAddress }; database.Profiles.Add(profile); database.SaveChanges(); Console

Copying large amounts of data into a SQL CE database

拜拜、爱过 提交于 2019-12-06 13:25:51
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? The first thing that popped into my head was to do a sync/merge with a desktop or server database, though that doesn't sound like it really fits your needs. So here is my second thought: BULK INSERT table_name FROM data_file I am not sure if it is supported in your version of SQL CE (though it appears to be supported in 3.5

Select from other table if value exist

╄→尐↘猪︶ㄣ 提交于 2019-12-06 12:29:49
问题 I created a fiddle for this, at this link: http://www.sqlfiddle.com/#!2/7e007 I could'nt find SQL compact / CE so it's in MySQL. The tables looks like this Records Clients ID | NAME | AGE ID | NAME ------------------ ---------------- 1 | John | 20 1 | John 2 | Steven | 30 2 | Daniel 3 | Abraham | 30 3 | 4 | Donald | 25 5 | Lisa 6 | | 35 6 | Michael 7 | | 42 7 | I would like to select from both tables, and if the id is in both tables and both have names I would like the the name from "Clients"

SQL Server CE - is an installation required (as opposed to just a DLL include)?

我只是一个虾纸丫 提交于 2019-12-06 12:25:54
Background - If I am building a WPF desktop application (VS2010 & .NET 4) and would like a lightweight database to use but without having to have a separate installation. SQLite would be OK from what I read however I was thinking it would be good to stick with the Microsoft bits and try to use SQL Server CE. Question - Does SQL Server CE require an "installation" separate to my WPF application's installation? Or does it just require me to create the database (as I can) within VS2010 and ensure the appropriate DLL is contained in the application when it's deployed? I'm looking at the doco at

SQL Server CE Incompatible Database Version

﹥>﹥吖頭↗ 提交于 2019-12-06 12:08:56
问题 I have a SQL Server CE 4.0 database ( .sdf file) and when I trying doing a query on the database from my application (WPF) I get the following error. Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = \?\C:\Database\ShortageReport\MRPDatabase.sdf] I have checked SQL Server CE 4 sp1 is installed. I have tried creating the database in both Database.Net 4 and in the

How do I join two tables with different column in SQL Server CE?

北城余情 提交于 2019-12-06 11:22:57
How can I joining two tables with different column in SQL Server CE? I have two tables: Table Schedule +-----+----------+------+ + ID + Name + Type + +-----+----------+------+ + 1 + A + 1 + + 2 + B + 1 + + 3 + C + 2 + +-----+----------+------+ Table Description +-----+--------------------+ + ID + Description + +-----+--------------------+ + 1 + A1 - XXXXX + +-----+--------------------+ And what I want to get is the table like: +-----+----------+-----------------+ + ID + Name + Description + +-----+----------+-----------------+ + 1 + A + A1 - XXXXX + + 2 + B + - + + 3 + C + - + +-----+---------

Increasing Windows Mobile 5 Emulator Storage

时间秒杀一切 提交于 2019-12-06 11:12:46
问题 I'm using the Microsoft Sync Framework to synchronize a SQL Server database with a SQL Compact SDF file on the Windows Mobile 5 emulator. We have a 2 gig SD card in the actual device we're deploying on so we'd like to store our database file there. However, when I map a shared folder as the storage card in the Windows Mobile 5 emulator, the SQL Compact engine is not able to create or modify a database file on the mapped storage card because of a bug. So to get past this during development on

Windows Phone 7 databases

半世苍凉 提交于 2019-12-06 10:33:14
i am new to windows phone 7 and im just looking for some information in regards to databases. I understand that we can use SQLce to store a database, i've got some idea on how to create one, at the moment i was wondering how to have prepopulated data when a app is loaded?, ive heard about sqlmetal is that a way of creating a database and addinbf data? Also When i have a database on a mircosoft sql server, is it possible for SQLce and SQL server to pass data between each other i.e hold the same database with same data? Also i believe that i must have a webservice for the phone to connect to the

SQL Server CE extremely slow on some computers

那年仲夏 提交于 2019-12-06 09:26:35
I've built an app that uses SQL Server CE 4.0 by default, but can also use a separate SQL Server (SQL Server Express). I've deployed it to about 10 computers around the office and it works fine except on 2 of them: the VP and a QA guy, of course :-/ On these computers, the database accesses are taking around 30 seconds each! If I install SQL Server Express 2008 R2, and tell my app to use it instead, then it runs very fast. Both problem machines are WinXP SP3, but most of the working PCs are XP also. I'm using C#.NET 4.0 App uses private deployment of SQL Server CE via ClickOnce. I'm using