Results 1 to 3 of 3

Thread: app.path (6.0)

  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    app.path (6.0)

    How to modify this conn string with "app.path"

    CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:MAPPAAREA.MDB;"

    in effect i want to use the .mdb sored in dir where is present the .prj file

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: app.path (6.0)

    App.path will be the folder where the compiled .exe file is.

    Try
    <code>
    Dim strPath As String
    strPath = App.Path
    If Not Right(strPath, 1) = "" Then
    strPath = strPath & ""
    End If
    CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPath & "AREA.MDB;"</code>

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: app.path (6.0)

    only you!
    Tks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •