Results 1 to 8 of 8

Thread: [2008] "App.Path" in VB.net

Threaded View

  1. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] "App.Path" in VB.net

    [Edited by MartinLiss] I already answered your question. I said use |DataDirectory| for the folder and to not do it in code because it's part of your connection string. I even provided an example. How is that not clear? Let me spell it out for you:
    Code:
    con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\TimeKeepingDB.accdb;Jet OLEDB:Database Password=*************"
    As you seem to be having a little trouble the first time around, let me also say again that that will be resolved to the appropriate folder at run time.

    Thanks for providing your database password too, by the way.
    Last edited by MartinLiss; Dec 19th, 2008 at 01:27 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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