|
-
Mar 23rd, 2006, 09:09 AM
#1
Thread Starter
Junior Member
[RESOLVED] DB hardcoded?
I read and followed various faqs regarding deployment and everything works fine accept that the newly installed app will only access the database at the original pre-deployment location, not the new install folder. Don't the database connectionstrings get converted or modified after deployment? How can I get the app to access the database at the install folder post deployment?
-
Mar 23rd, 2006, 09:18 AM
#2
Re: DB hardcoded?
My guess is that the connection string contains a hard coded path rather than App.Path.
If it is indeed hardcoded, then you have only two options:
Go back to the source and change to using App.Path/recompile/redistribute
Have your installation package create the exact same folder structure as the hardcoded path in the application and put your database there.
-
Mar 23rd, 2006, 09:28 AM
#3
Thread Starter
Junior Member
Re: DB hardcoded?
When you say hardcoded do you mean like when I declare
Dim conn1 as New OleDbConnection
conn1.ConnectionString=".......
What about those where I create using drag and drop method, where I use the popup to create a new connection? Are those considered hardcoded as well?
What is this App.Path thingy? New to programming sry
-
Mar 23rd, 2006, 09:51 AM
#4
Re: DB hardcoded?
By hardcoded I mean:
"c:\foldername\foldername\foldername\database name.mdb"
It would appear as though the actual names of the folders have been included in the connection string. If those folders do not exist on the target machine, you will get an error and your database connection will fail.
App.Path means the "path of the application". In other words, the folder in which the .Exe file resides. If you use App.Path in your connection string, then your connection string will look for the database in the same place as your program is.
-
Mar 23rd, 2006, 03:54 PM
#5
Re: [RESOLVED] DB hardcoded?
huhhuh,
Why not just post your connection string and let someone look at it. It will be solved very quickly that way...
Last edited by randem; Mar 24th, 2006 at 04:43 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|