Results 1 to 4 of 4

Thread: [RESOLVED] How do i add Application Data Folder path to my connection string?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Location
    Uk
    Posts
    157

    Resolved [RESOLVED] How do i add Application Data Folder path to my connection string?

    My database is installed in the Application Data folder, how do i add that location to my database connection string?

    Code:
    Friend DBConnectstrings = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=????\database.mdb;Jet OLEDB:Database Password=123456789;"
    Code:
    Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,375

    Re: How do i add Application Data Folder path to my connection string?

    Take a look at the link in my signature: Let the user choose the connection string

    Edit - Nvm, I misread your post look at .Paul. post below.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,415

    Re: How do i add Application Data Folder path to my connection string?

    Code:
    "Friend DBConnectstrings = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & io.path.combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "database.mdb") & ";Jet OLEDB:Database Password=123456789;"

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Location
    Uk
    Posts
    157

    Re: How do i add Application Data Folder path to my connection string?

    Many thanks guys - Paul excellent work

Posting Permissions

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



Click Here to Expand Forum to Full Width