Dim strDBPath As String
strDBPath = App.Path
If Right(strDBPath, 1) <> "\" Then
datAgents.DatabaseName = App.Path & ".\IPM-DB.mdb"
End If
I use this to find my MS Access DB file. When I use the Package & Deployment wizzard and install the program on the same PC where my Visual Studio is installed I don't get any errors.
When I install it on another PC WITHOUT Visual Studio installed I get the error:
"Provide cannot be found. It may not be properly installed". I almost smacked my screen off the desk. I remember this error from 3 years ago when I use code in VB a lot.
Is this because I havn't installed DotNet SDK 1.1 on the other PC?
I know the piece of code I pasted above is the reason for the error, coz if I remove it and set the databasename/connectionstring to C:\Program Files\IPM\, i don't get no errors. This is not good coding so I don't wanna do it.
Please help!
App.Path Error when Compiled
Started by
Guest_roger_*
, Jun 01 2006 07:59 AM
3 replies to this topic
#1
Guest_roger_*
Posted 01 June 2006 - 07:59 AM
Guest_roger_*
|
|
|
#2
Posted 01 June 2006 - 10:38 AM
If you didn't have the correct DotNet on the other computer your installer would of detected it assuming you used Setup and Deploy wizard in Visual Studio.
What version of Visual Basic are you using? It looks like 6.0.
What version of Visual Basic are you using? It looks like 6.0.
#3
Posted 21 June 2006 - 04:44 PM
Uhh..what happens if App.Path ends in a "\"?
#4
Posted 06 September 2007 - 10:05 AM
Nothing happens if it ends in "\", just as long as you don't put a "\" after the filename. Why do you have a "." right before your "\" in your first post? That would cause it to error.


Sign In
Create Account

Back to top










