Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

- - - - -

App.Path Error when Compiled


  • Please log in to reply
3 replies to this topic

#1 Guest_roger_*

Guest_roger_*
  • Guest

Posted 01 June 2006 - 07:59 AM

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!
  • 0

#2 Lop

Lop

    Speaks fluent binary

  • Just Joined
  • PipPipPipPipPipPipPip
  • 1112 posts

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.
  • 0

#3 brackett

brackett

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 192 posts

Posted 21 June 2006 - 04:44 PM

Uhh..what happens if App.Path ends in a "\"?
  • 0

#4 o0TheNerd0o

o0TheNerd0o

    CC Resident

  • Just Joined
  • PipPipPipPip
  • 59 posts

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.
  • 0