I have a SQL Server database which I can read from, is there a quick way I can turn it into an SQL Server CE database through C# or will I have to read in all the data then output it in SQL Server CE.
You can use my SQL Server Compact scripting API, which will allow you to export a Server database to a script file, and run the resulting file against a SQL Server Compact database from your C# code. http://exportsqlce.codeplex.com/wikipage?title=Scripting%20API%20samples&referringTitle=Documentation
Related
How can I connect a c# application which contains a database on another pc that doesn't have SQL SERVER Instance (.SQLEXPRESS) installed?
It cannot be possible.
But, you can use SQl SERVER COMPACT EDITION.
Sql Server Compact Edition allows you to create a local database that can be accessed without sql server
I need to develop a function that takes a SQL query as input and execute this in phone database (SQL Server CE) and return result.
As far I know we can query SQL Server CE in wp7.1 only through LINQ. So is it possible to develop that kind of function?
Please help....
you can query SQL Server CE in wp7.1 only through LINQ.
I am using Microsoft server 2003 running sql server 2005 which I have added an asp.net website on IIs.This works perfect. I can display the website on the browser and also read information from the sql server. My problem now arises when I want to do exactly the same but with my laptop which is running sql server 2005 express on windows 7. the websites displays just fine on the localhost but when I login it gives me an error saying that it cannot read files.
So my question is that is there a difference between sql server connectionstring and sql server express connection string? or the error is not connectionstring related?
Yes, the connection string for SQL Server CE is typically different from SQL Server. SQL Server CE is "self hosted." You basically connect to a file in your app_data directory. SQL Server, in contrast, has many ways to connect to it: via TCP/IP, Named Pipes, etc.
A typical SQL Server connection string is this:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
A typical SQL Server CE connection string is this:
Data Source=MyData.sdf;Persist Security Info=False;
Notice how for SQL Server CE you specify the path to your database file. For SQL Server, you typically specify the server running the SQL Server Service.
Many more examples here.
I have a project that currently uses a SQL Server database on the shared hosting server that I pay for monthly. I want to migrate my schema from there to a new SQL Server CE database in my solution. Is there an easy way to do this?
I can't see a way to do this without manually re-creating the entire thing. It's a decently sized schema, but it's not very complicated. It's just tables with some foreign keys here and there, nothing fancy.
Anyone know how to migrate down from a regular SQL Server database to a SQL Server CE database?
http://exportsqlce.codeplex.com/
It can script SQL Server databases for running on CE.
I have a Compact Framework 2.0 app that consume a WCF service. The data that retrieve from the service will be store on a SQL Server 2005 CE.
The SQL Server CE database has his own tables. I use a TableAdapter to access SQL Server CE and Insert and Select statement to store and retrieve data.
Is there a better way to do it?
You could consider sync framework
http://blogs.msdn.com/sync/archive/2009/06/04/announcing-sync-framework-2-0-ctp2.aspx