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 new DB in folder IS is installing?
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
‎Aug 09, 2007
11:58 AM
Cannot Create new DB in folder IS is installing?
During install I am running a SQL script to create a database. I want to have the database reside in a folder that IS will install on the user's machine.
So for instance, I want it to install at\DB
When IS runs the SQL script, I get the following error.
I'm assuming that until IS is done running, any folders it creates are read-only. As such, I can't create the DB where I want.
Does anyone know a work around for this?
I should also note, that if I tell my script to create the DB in a DIR that IS is not creating, it works fine.
Thanks in advance
So for instance, I want it to install at
When IS runs the SQL script, I get the following error.
Error 27506.Error executing SQL script sqlscript.sql. Line 49. CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'c:\path\to\dir\data.mdf'.(5123)
I'm assuming that until IS is done running, any folders it creates are read-only. As such, I can't create the DB where I want.
Does anyone know a work around for this?
I should also note, that if I tell my script to create the DB in a DIR that IS is not creating, it works fine.
Thanks in advance
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2007
12:45 PM
How do you create the desired folder using IS?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2007
01:24 PM
I've added the folders in "Files and folders" as seen in this image
http://sparq-l.com/stuff/images/oops/folders.jpg
Is there an alternate method I should be using?
http://sparq-l.com/stuff/images/oops/folders.jpg
Is there an alternate method I should be using?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2007
01:32 PM
Do you correctly specifiy the path of a database file that you attempt to create in your SQL script? I am assuming that you want to create it under C:\Program Files\Leo Software\Leo\DB folder, but the error message is stating 'c:\path\to\dir\data.mdf'.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2007
01:38 PM
Yeah, I am using the correct path. Sorry for the confusion. In the error message, I was just trying to make it more legible.
But my SQL script does in fact point to C:\Program Files\Leo Software\Leo\DB
But my SQL script does in fact point to C:\Program Files\Leo Software\Leo\DB
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2007
03:09 PM
It seems an issue or limitation of Microsoft SQL Server 2005 Express Edition. The behaivor is reproduced (even if you run the same script from Microsoft SQL Server Management Studio) when you specify any path containing one or more space characters for a database file in the CREATE DATABASE statement. It is working with Enterprise Edition. One workaround I can think of is to copy your database file to the target machine and call sp_attach_db stored procedure in order to create the database.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2007
03:13 PM
Well, it's not the answer I was hoping for, but at least I know it isn't from me doing something incorrectly.
Thanks for the alternate suggestion, I might give that a try.
Thanks for the alternate suggestion, I might give that a try.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)