# SQL databse query.



## redhat (Nov 19, 2010)

Hi friends, I would like to create a program with a MySQL DB at the back-end. Firstly can I do this and how? I know I can use MSSQL with VS2010 on the front-end but I couldn't understand how to use MySQL as the back-end.
Secondly, I want to know how I can deploy this standalone program to the end-user who does not have SQL Server installed on his PC.


----------



## Pratul_09 (Nov 19, 2010)

1> You will need MySQL ODBC drivers, that you need to install separately with MySQL installation.
checkout the sample at :
Connecting to MySQL Database using C# and .NET - CodeProject

2> You can use Inno Setup that is freeware to make a setup with your standalone program + database + ODBC drivers (you may require bat files for some automation).

3> If the end user does not have SQL server installed you can provide SQL Expess edition setups that are free to use and are excellent for small to medium databases


----------



## redhat (Nov 20, 2010)

Thanks.. Ill try the first two solutions. 
But for the third one, is there no other way than installing SQL Server express??
I would prefer if I can install the required software during the installation process for my app itself. I dont want to install the server separately. how can that be done?


----------



## Pratul_09 (Nov 21, 2010)

can you explain yourself a bit more so that i can understand your problem better.


----------



## arpanmukherjee1 (Nov 22, 2010)

sql express quiet install:
How to: Install SQL Server 2008 R2 from the Command Prompt

mySQL quiet install
MySQL :: MySQL 5.0 Reference Manual :: 20.2.2.1 Installing Connector/NET on Windows


> You may also use the /quiet or /q command-line option with the msiexec tool to install the Connector/NET package automatically (using the default options) with no notification to the user. Using this method the user cannot select options. Additionally, no prompts, messages or dialog boxes will be displayed.
> 
> C:\> msiexec /package conector-net.msi /quiet
> 
> To provide a progress bar to the user during automatic installation, use the /passive option.


----------



## redhat (Nov 24, 2010)

@Pratul_09: I was asked to develop a standalone app by a friend. He will need to deploy it on about 3-4 PC's. The said application needs a database on the back-end and I decided to use SQL since I am very comfortable using it. But I was stuck on how to deploy the said database. I am only a hobbyist programmer and have never actually deployed any of the applications I have made. So I wanted to know how to deploy the database and if I need to install SQL Server Express, I wanted to do it quietly something arpan pointed out very well.
So I guess, I can say Problem Solved.
@arpanmukherjee1: Thanks a lot!! I simply did not think of using the command line installer!! That solves the problem.. thanks people..

PROBLEM SOLVED
THREAD CLOSED


----------



## Pratul_09 (Nov 24, 2010)

Happy you found your answer


----------



## arpanmukherjee1 (Nov 25, 2010)

redhat said:


> @arpanmukherjee1: Thanks a lot!! I simply did not think of using the command line installer!! That solves the problem.. thanks people..



ur welcome


----------

