Installing SQL Server Express during Install  
Author Message
Bubba_WGU





PostPosted: Visual Basic General, Installing SQL Server Express during Install Top

Hi All,

My application requires the use of SQL Server Express in order to run so as a result I need to have this installed when the user installs my application. However, I have a problem in that I need to adopt a Client / Server approach to the Installer, so a user can simply install SQL Server Express, or my application or both if needed.

My problem is how do I do this I appreciate that I can have custom dialogs, conditions etc., within my setup and deployment project but what about physically creating the Database, Tables, Roles, Stored Procedure etc. How do I do that What's the best option Is is possible to have a database file system pre-created (i.e. .dbf and .log files) and simply mount this. Or do I need to use scripts

Can anyone provide me with resources / links to content that will help me accomplish this I'd really appreciate it.



Visual Basic6  
 
 
spotty





PostPosted: Visual Basic General, Installing SQL Server Express during Install Top

SQL Express is designed as a local database solution and uses different drivers to the full blown pay version of SQL Server. Depending upon the version of VB your using you may be rather limited to your deployment options (VB Express only supports click once for deployment)

This is not a problem with SQL Express as the database consists of a simple mdf file which can be deployed with click once. (This would be you pre-created database file) You then add the SQL Express prerequisites to your application publish setting and when you publish your application and it gets deployed - if SQL express doesnt exist on the end-user machine already then it will install it, if it it does then it skips this step and simply installs your application. What use would you have for installing a SQL express file on the local machine, without a means to access the information

If you want to use SQL Server and not Express then you could create a windows installer which would enable you to do much more sophisticated dialogs, conditions etc. on the install. But you'll need to purchase a copy of VB / VS which enables creation of windows installers (VB express does not)