This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Cannot create SQL .mdf file and can't see why not.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 20, 2008
11:07 AM
Cannot create SQL .mdf file and can't see why not.
I'm a new user of Installshield 2008 Professional.
I've got a fairly standard project to install:
1. ASP.Net Virtual directory
2. .Net 3.0 Framework
3. SQL Express 2005
1 and 2 install as they should, but I cannot get 3 to complete, and I'm sure I must be missing something fairly obvious and newbie-related, but I can't see it, so any help would be appreciated.
I've got a working SQL script to create the database, which works as it should in SQL Server Management Studio, and creates the database in any specified location. I've added that SQL script to my IS2008 project, checked the box for 'Run Script during install', and also got a Text replacement entry for Find: %DatabaseDataDir% Replace with: [INSTALLDIR]ABCFolder.
ABCFolder is created by the Installer.
The installer runs, copies the files and folder to the target, creates a virtual directory, but always fails attempting to execute the CREATE DATABASE command from the SQL Script, complaining that "Create file encountered operating system error 5', which a Google says relates to a missing file or folder, but the folder is there at the point of the error - the installer just created it, and I've checked that. That script also creates the .mdf file successfully at the same location outside of Installshield.
Can anyone suggest any pointers to help?
Mike
I've got a fairly standard project to install:
1. ASP.Net Virtual directory
2. .Net 3.0 Framework
3. SQL Express 2005
1 and 2 install as they should, but I cannot get 3 to complete, and I'm sure I must be missing something fairly obvious and newbie-related, but I can't see it, so any help would be appreciated.
I've got a working SQL script to create the database, which works as it should in SQL Server Management Studio, and creates the database in any specified location. I've added that SQL script to my IS2008 project, checked the box for 'Run Script during install', and also got a Text replacement entry for Find: %DatabaseDataDir% Replace with: [INSTALLDIR]ABCFolder.
ABCFolder is created by the Installer.
The installer runs, copies the files and folder to the target, creates a virtual directory, but always fails attempting to execute the CREATE DATABASE command from the SQL Script, complaining that "Create file encountered operating system error 5', which a Google says relates to a missing file or folder, but the folder is there at the point of the error - the installer just created it, and I've checked that. That script also creates the .mdf file successfully at the same location outside of Installshield.
Can anyone suggest any pointers to help?
Mike
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 20, 2008
11:33 AM
As sometimes happens ... , I answered my own question wthin minutes of posting.
The target folder to hold the database file needs to have permissions set in Installsheild in the Applicaiton Data->Files and Folders section.
The target folder to hold the database file needs to have permissions set in Installsheild in the Applicaiton Data->Files and Folders section.