How to use database without installing it? - c#

I have a database in SQL Server 2008. I want to deploy my software with CD.
I want to give end user 2 choices :Use from CD and install it.
When end user selects the "Use from CD", I don't want install program.
How can I do program execution without installing?
Please help me about this problem
Thank you for your attention.
The program is coded In C# in MS visual studio 2010.Database Management system is MS Sql Server 2008

Use an embedded database which requires no setup and in-process execution, in your case best option is probably SQL Server Compact Edition
Edit: I know there are also other alternatives like BrekleyDb or SQLite but since Atayi is using SQL Server right now for his database, I suggested SQL Server Compact Edition to avoid any issue and stay on essentially the same technology/platform.

Please help me about this problem
Don't use the technology you selected.
This is like saying "I want to drive a ferrari, but one that uses no fuel". Engines use fuel. SQL Server requires installation.
Alternative is SQL Server CE which you can load into the process.
THat is it. Run from CD is not possible without having SQL Server installed if you use SQL Server. Arguing wont change that.

First of all, I don't know if SQL Server '08 exists as a portable version, but if it burned on a cd, the use of a database is not there. The burned files cannot be changed :-)
A portable DBMS is SQLLite, there are bindings for C# :-)

You can "Silent Install " Sql server also, that way the client will not be bothered by the configuration of the server.

When running from CD - change database back-end - use simple Microsoft Access Db file with ADO ODBC connection. In such case - you will have almost same SQL language and no need to install something for access db (huh, maybe general odbc drivers if they not exists).
When running from HD - switch db backend to full-scale MS SQL server ...

Related

C# connect to MSSQL .mdf DB without Server

How can I ran x86 .net 3.5 Windows Forms app with .mdf database on the computer without SQL Server (for example, XP of common user).
I have found few samples of connection strings, but all of them are contains something like Data Source=.\SQLEXPRESS
Doubt, that user will be having SQLEXPRESS on his computer. I want something like work with Access db - so user could work without even knowing, what's server, only with local file
MSSQL I have chosen instead of Access, because in the future I can add publish DB on server, but not now.
Maybe, I should use SQLLite, but how in that case?
Thanks.
How can I ran x86 .net 3.5 Windows Forms app with .mdf database on the computer without SQL Server?
This question has very simple answer - you can't!
You must distribute and install some version/edition of SQL Server with your application, otherwise the .mdf file will be nothing more than waste of disk space. You can install SQL Server along with your app. For more information you can see Install SQL Server from the Command Prompt and Install SQL Server using a configuration file. If this is a simple app working locally on a single workstation, you may want to consider using SQL Server Express LocalDB.
Another option is to use different database engine, which has easier deployment and embedding - SQLite, Firebird Embedded, etc. Pick one that you like. Most of these solutions require only to distribute one DLL/assembly with your application. You will not get the full power of SQL Server, but for most apps, it isn't needed anyway.

Use SQL Server CE 4.0 multiuser and different processes

I searched the WWW and found different answers. sometimes I read articles about the SQL Server CE 4.0 and the multiuser ability. But I can not use it with different processes or on different machines at the same time. Unfortunately, I used SQL Server CE and now I need exact that feature. Is there a way to do it? Or is the only way to use a SQL Server Express edition or another file base db like sqlite to avoid a complete code change?
Update: yes, all users need to read and write!
Thanks for any suggestions!
tro
Use SQL Server Express (or any other edition), not a filebased database for this scenario.

C# SQL Server data storage

I'm writing an application in c# that uses SQL Server database for storage propose.
My question might be a bit silly, but yet I don't understand something..
I use a lot of application that use SQL Server for storage, but it looks like the DB is inside the application and installed in the installation process.
Does every time I use my SQL Server db in my application I need to install a SQL Server in my client's computer ?
Or can I somehow wrap my database in the installation ?
It looks a bit weird to me that a SQL Server must be installed in every computer I want to install the application on - although it uses a very simple database.
Maybe the solution is to use some other storage option ?
You can use a database like SQL Server CE or SQLite which doesn't require installing a server. It is just a single database file that is included with your program.
In teory you have to install only the client, but it is already installed in every Windows... You have just to config it. Run cliconfg on the command line. On 64 bit you have to choose which version (32 or 64 bit) to run
Usual practice for this kind of scenario is to provide user interface that would allow the client to enter server name and credentials with enough privileges.
I wouldn’t create an application that would automatically install SQL Server on client’s computer because that’s too intrusive.
Just provide a nice and clean user interface in the installation process and your clients will be able to do the rest.
Yes, there are options for SQL Server Compact Edition and other similar stuff but you’ll also have a ton of restrictions with these versions.

Can I avoid installing SQL Server on client machines?

I have a nice program idea, it will be a very simple application that will save your username and password on a sql server database file, i know how to do it, but the problem is i don't want the client to install sql server in order to add or remove a record in database, besides i want my database file embedded into the application so the user have a single .exe file, i heard about a library called sqllite or something, it`s function is not to let the user install sqlserver to make the application work.
You can use SQLCE and search for SQLCE private deployment, basically it is a light weight of MS SQL on client side. With privatedeployment you just need to copy related DLLs to your project folder without installation.
You are looking for SQL Server Compact edition.
You need to use a file based SQL database.
There are several - most popular are:
SQLite
SQL Server CE
See this SO question - Free portable database.
As you mention, Sqlite is an option. It's a compact and file based database. No need for installing anything. The full database resides in a file. You'll need to reference the Sqlite database engine for connecting to it, however.
I probably wouldn't use SQL at all if you are only going to create one table with a few (< 100) rows. Its way to much overhead for that small amount of information.
I would save the username and password in a file, then use the Enterprise Libraries Cryptography Application Block to secure the file.
You also most likely don't want the storage engine embedded into the exe, then your passwords are tied to that specific application on that specific computer. You will have to implement an import/export program anyway to move your info to another machine.
Check out http://keepass.info/
Yes , you can implement it by
SQLite ,
SQL Server CE ,
Or Xml
And also , in my last project , the application call the webservice when need to access DataBase.
So , there are lots of ways to avoid install SQL Server on client PC .

DBMS for POS software

I want to develop a POS application in .NET (C#) that would be used to rent items. I have a good idea of what will be done and the famous question that I have is about the DBMS that I should use. I would like to use MySQL database.
The question is: If some places use only one computer (no network, no internet connection), can I use a MySQL database in local? Do I need to install MySQL server on all thoses computers to be able to use such a database? I know SQLite but I'm not sure if the limitations can cause problems in the future... I also looked at SQLServer Express versions.
(I must consider that other point of sales are using multiple computers and more transactions so there I can't put sqlexpress or sqlite)
So can anybody suggest me what I should do in that situation?
Thanks
You would be able to use MySQL in localhost - and it would need to be installed on each local machine.
You could use MySQL. If you are sharing a database between several computers you should just be able to install the MySQL client components.
As for which database you want to use, I would highly suggest SQL Express. The security model and tooling is much better. There is nothing stopping you from using SQL Express as a shared database server until you out grow it.
SQL Express Redistribution EULA
POS systems like Open bravo POS software where special user types and hardware devices support are required.ou can use sharing a database between several computers for using sql.

Categories