Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello again
how to make exe file from Windows form application which is using sql database.i want to install my application to another computers in a Local area network.does anybody have a complete guide for this?
Posted

For making an .EXE?? You do that every single time you Build your app.

If you're talking about deploying your app, that's a different question. One which depends on the database engine you're using and where the database is going to be located.

If you really are using SQL Server, is it a seperate server install or are you using SQL Server Express, or some other edition?
 
Share this answer
 
Comments
FM7 5-Mar-12 21:52pm    
use sql server,and need to make an exe file with it dependencies such as DB and framwork to instal it to another PC
Dave Kreskowiak 5-Mar-12 22:29pm    
If you're using SQL Server (any NON EXPRESS edition) then you don't include the installation of SQL Server. You just come up with a script that creates your database on the SQL Server. Of course, the user will have to supply credentials to use with the SQL Server in order to run the script on it.

Next, you just create an installer for your project. If you're using a non-Express edition of Visual Studio, there's a Setup and Deployment project you can add to your solution to package up your app. Go to the File menu and select Add -> New Project -> Other Project Types.

Hi,
You can try adding a form which logs in to your SQL database and then saves the login info to your registry or text file. These info will then be read by your application whenever your program starts. You will need the SQL Client installed to computers where your program will be installed. Hope this helps.
 
Share this answer
 
Comments
Dave Kreskowiak 5-Mar-12 22:29pm    
What does this have to do with packaging and deploying the project to another machine??
Charlemagne Gustilo 5-Mar-12 22:38pm    
Oh hi Dave! thanks for correcting me. I forgot to mention how to build the exe. I focused only on how to create a program to connect to a database. As you have mentioned, we can create a new setup and deployment project, or by right-clicking the project -> properties -> publish tab -> publish wizard button. Thanks Dave!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900