sql-server-ce

How to use the class SqlCeConnection in the Window Phone 7 application?

旧城冷巷雨未停 提交于 2019-12-13 06:32:34
问题 I am developing window phone 7 application. I am new to the Window Phone 7 application development. I want to use the SQL server compact edition database in my application for database connectivity. So in my application I have created the database by right clicking the 'Data Connection' & Choosing the 'Add Connection' in Server Explorer. After that I have created the database by using the Create button in the opened window.Then I have tested my connection. It was successful. I have added that

Problems faced in keeping SQL Compact Edition Database on another machine in same network

不羁岁月 提交于 2019-12-13 06:19:59
问题 I am using SQL CE 3.5 for one of my project, the front end is WPF application which process the given files and dumps the data to SQL CE database. Presently application and DB is on same machine. Client wants that he should be able to run the application from any machine on the network but database should remain on shared location of Server. User will select the path to SDF file in the Application and then when any file is processed application will dump the data to database. My question is,

SQL Server Compact Edition Data Access with the SqlCeResultSet in Visual Studio 2013

寵の児 提交于 2019-12-13 06:03:37
问题 I would like use the SqlCeResultSet like this tutorial in Visual Studio 2013. This is the code of my class Form1: private SqlCeConnection _conn; public Form1() { InitializeComponent(); _conn = new SqlCeConnection(@"Data Source = |DataDirectory|\Northwind.sdf"); this.dataGridView1.AutoGenerateColumns = true; } private void Form1_Load(object sender, EventArgs e) { SqlCeCommand cmd = new SqlCeCommand("SELECT [Employee ID], [Last Name], [First Name], Photo FROM Employees",_conn); SqlCeResultSet

SQL Server edits the table name with dbo as prefix

爷,独闯天下 提交于 2019-12-13 05:36:46
问题 I have been using SQL Server CE for a while. In that database the table names were like UserPosts , UserProfile . But after my upgrade from SQL Server CE to SQL Server the names are edited to dbo.UserPosts , dbo.UserProfile . And also the names of columns are wrapped in square brackets like: [UserProfile] . Why is this bracket used? 回答1: Brackets are used to surround names in SQL Server (they server the same purpose as double quotes). For names that consist of alphanumeric characters and

How do i correctly query a sql ce 4.0 database file using adodbapi?

你离开我真会死。 提交于 2019-12-13 04:52:57
问题 I have the following method: def open(self, filename): if not os.path.exists(filename): raise IOError("Cannot find Game Database file {0}").__format__(filename) connstr = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0; Data Source={0};".format(filename) conn = adodbapi.connect(connstr) curs = conn.cursor() query = "Select * from Patient;" curs.execute(query) results = curs.fetchall() for r in results: print r When this runs, the following error is rased on curs.execute(query): (<class 'adodbapi

C# application publish - errors on different systems

喜你入骨 提交于 2019-12-13 04:41:42
问题 I've made an application in C# . it's a WPF application with SDF DB. I have VS2008 express. I published my application (with SQL-CE dll) and installed it on my computer (I have windows XP) and on another WinXP computer and it worked fine. I sent the same files to 2 people with windows 7. the first one couldn't install the application - she got an error message like "cannot download the application [...] missing required files [...]". the second one (window 7 with 64 bit) installed it but she

attempted to read write protected memory. this is often an indication that other memory is corrupt [closed]

*爱你&永不变心* 提交于 2019-12-13 04:38:54
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . I have developed a desktop application using C# and sql server compact 3.5 I have import all necessary dll's System.Data.SqlServerCe.dll sqlceca35.dll sqlcecompact35.dll sqlceer35EN.dll sqlceme35.dll sqlceoledb35.dll sqlceqp35.dll sqlcese35.dll And deploy it while it is running without any error on

How to convert stored procedure to SQL Server Compact Edition query

情到浓时终转凉″ 提交于 2019-12-13 04:32:36
问题 I have a stored procedure that I need to convert to a standard query. Since I'm using SQL Server Compact, no stored procedures. Here is my stored procedure: declare @colu nvarchar (max) , @hour int set @hour = DATEPART(HH, GETDATE() ) select @hour select @colu = case when @hour=24 then '[12:00AM(00:00)]' enter code here when @hour >12 and @hour <24 then '['+ convert(varchar,@hour-12) +':00PM('+ convert(nvarchar ,@hour) +':00)]' when @hour=12 then '[12:00PM(12:00)]' when @hour <12 and @hour >9

Why is this SQL update failing with “there was an error parsing the query”?

微笑、不失礼 提交于 2019-12-13 04:21:19
问题 An earlier problem with this query was resolved here but now this query: ...fails with: Why? It worked once (it was the fix for the earlier question linked to above). The unseen part of the err msg's "Description" line is: " [Token line number,Token line offset,,Token in error,,] " 回答1: Strangely enough, removing the brackets surrounding the table name and column name allowed the update to fire successfully. So why it worked once before, I don't grok. 来源: https://stackoverflow.com/questions

SQL CE over a network share

邮差的信 提交于 2019-12-13 02:26:24
问题 I have seen this question asked previously but can not find a clear explanation of what is/isn't possible and what workarounds migth be available. I have an existing C# application that uses SQL CE to store local information. This database is only accessed by a single application and is stored in the user's appdata folder. Some environments have the appdata folder redirected to a network share which causes SQL CE to throw an exception: "Internal error: Cannot open the shared memory region." I