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
Related
I have created a CRUD application that is running really well. It connects to SQL on the same machine. I want to publish my C# app and install it on another PC does not have SQL.
Is it possible to run it on that PC, without installing SQL Server on it? If so, how do I do this?
Is it possible to run it on that PC?
Without a database your application is "dead".
You have two options.
Install a sql server it this PC.
Connect to a sql server isntalled in another PC.
It's your choice.
If your project is a small one and the database is less than 4GB and you are not going to install SQL Server on every machine and your client do not have access to a Server with SQL Server then you may want to use SQL Server compact
In this case your database would be an single sdf file and you will connect to it using its path on the machine. Then the connection string would be like this:
Data Source=MyData.sdf;Max Database Size=256;Persist Security Info=False;
For more on connection string see this.
Here is the download link
I am writing a program for my work that would allow an employee to use a laptop in the field and sync what they have done back to the server once they return to the office.
I have completed this task with Windows Mobile 6.5 and RDA through Microsoft SQL Server Compact Edition 3.5. My problem is that SQL Server CE 3.5 does not support geospatial datatypes which are needed.
Also newer versions of SQL Server CE do not support RDA (remote data access). In the past I have tried replication but found it to be overkill for the small projects I am working on.
Can I use SQL Server Express to sync back data to the database once the user returns to the network?? I'm using SQL Server 2008 R2 standard on the network.
Yes, you can use SQL Server Express, as long as the database size doesn't get larger than the limit. That maximum, for SQL Server Express 2008 R2 is 10 GB. Further, I would recommend SQL Server Express over SQL Server CE any day.
I did an offline database project one time and we found that SQL Server Express was the right approach as well. It's a fully featured database.
I want my application to create database in the user's computer. The database would be simple, with only one table. Is this possible? What would be in the connection string? Should the user have installed some kind of server?
I suggest you take a look at SQL CE - it is an embedded database which you can distribute with your application.
Microsoft SQL Server Compact (SQL CE) is a compact relational database produced by Microsoft for applications that run on mobile devices and desktops.
I have been developing an application over the last few months using EF code first approach with SQL Server Express. It has been great but now I am ready to deploy my application to a live server I need to be able to begin using EF with a standard SQL Server Management Studio database.
I have scripted the db from my personal instance of SQL Server Express and created the db on the live server via management studio. I have also copied the data from the EdmMetadata table to the live db.
Will I be able to continue using DbContext the same way as before and simply change the connection string? I assume I won't so what are the issues facing this?
YES OF COURSE!
SQL Server (Express or Standard or Enterprise editions) are absolutely 100% binary compatible - SQL Server Express IS a full-blown SQL Server edition, same code-base as the other editions, only with some "artificial" (marketing-induced) limitations....
You could even create a BACKUP from your SQL Server Express (to a .bak file) and restore that back onto a "full-blown" SQL Server edition - works flawlessly.
And YES - EF can absolutely connect to a full-blown SQL Server, too - with all three coding approaches (database-first, model-first, code-first). All you need to change is your SQL Server connection string that you have stored somewhere.
I am creating a window application that need to use sql server database.
I want to install this application to client machine without installing sql server so that my application can still connect to a database i.e mdf file that i will be providing at client system.
How can i connect to a database(mdf) on client machine through my window application without installing sql server. ?
I dont know is it possible or not.
If possible what will be the connection string in that case. Database need not be used in network.
Client mahine dont need any installation. Every thing needs to be run through pen drive
.mdf files are SQL Server database files. No other application can understand, read or update those files. If you need to open and mdf, you need a SQL instance. That instance can be local, can be an Express edition, or can be a remote one, doesn't matter. If your application needs a local SQL instance for it's own use then it can install SQL Server Express Edition when deployed.
You can try Sql Compact Edition or SqlLite. I think these are just a file based solution.
In that case you must have a server machine where your database files are stored. For that reason you have to use SQL Express Edition 2005 or 2008 in one machine and SQL server management studio to manage your database. Those are all free from Microsoft. The client machines will be connected through the connection string. Those machines don't need SQL instance or SQL server installed.
Regards..
You can search your MS-VS CD for SQLEXPRESS (please note the capital letters) and include it in your software when you create the set-up and your problem will be solved.
You don't have any other way except to use another database like access.
This database doesn't need its software.