Hi to all
I have done a project in c# .NET. In this i have used internal SQL server 2005 for database.. I tried to create setup file for my project. Since i have used the database i could not run the application in any other system except my own system in which i developed the project..
I found that this problem occurs due to database..
Any body can explain me how to rectify the problem?
Thanks in advance
With regards
ila
Loading
Hirendra SisodiyaPosted May 18, 2010, 6:56 AM
You need to install sql server express edition and attach you database with it.
you can do these these things in many ways like :
1) you can use prerequistes for installing sql server express edition(Internet connection is required on client machine).
2) you can install sql server express edition and management studio and than attach database manually.
3) and my idea is :
you can do all things(application installation, sqlserver express installation and database attachment) on the time of application installation.
A. You need sqlserver express edition executable(.exe) that is free downloadable on MSDN.
B. Add new window application project with one form.
C. Add installer class in your main application
D. Add sqlserver express edition executable(.exe) and window application executable in you rsetup project and set the Default location to any path like "C:\temp\" .
E. Add primary output of main application in Install custom action in setup.
F. Add this code in installer class :
myProcess = New System.Diagnostics.Process()
myProcess.StartInfo.FileName = "C:\temp\WindowsApplication1.exe"
myProcess.Start()
G. Add code for installing sql server express with instance name and code for database attachment on form1 of windows application and set visible to false
Build setup project..
thanks
Please mark as answere if it helps
ilaPosted May 17, 2010, 8:04 AM
Can u explain me that little more??
With regards
ila
Hirendra SisodiyaPosted May 17, 2010, 6:51 AM
Some time ago i have developed a .msi file(Set File) with Automatic Sql Server Express installation with out any error. Do you want to do same thing..??
thanks