Results 1 to 7 of 7

Thread: How to change DataBase localisation when publishing my app

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    How to change DataBase localisation when publishing my app

    Hi

    First of all, it's my first post on this forum and I hope it won't be the last .

    I've been working on application using VB express 2010 that saves the information in an Access dbase.
    Everything work fine except when I publish my application. The database is save in c:\User\AppData\Local....
    Is there a way to change the localisation where my application try to find the dbase?

    Thank you for your help and I hope this thread is in the right place

    P.S Sorry if it's not very clear english is not my first language.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to change DataBase localisation when publishing my app

    If you use the appropriate connection string, i.e. use "|DataDirectory|" for the folder path, then it will work without change, which is the whole point.
    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    Re: How to change DataBase localisation when publishing my app

    I'm allready using "|DataDirectory|" for the folder path in Myproject/settings/value. My application is using the database in DataDirectoy when debugging
    but when I publish she's trying to find it in AppData folder.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to change DataBase localisation when publishing my app

    Is this a Windows Forms app that you're publishing using ClickOnce? If so, is the database actually being included in the publish? You can find out from the Publish page of the project properties.
    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    Re: How to change DataBase localisation when publishing my app

    I'm using Clickonce for publishing my windows forms app. When I go in the publish section application files I see my database. After the publishing, I find my dbase.deploy in the applications file folder.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to change DataBase localisation when publishing my app

    I don't really use ClickOnce myself but, if you're using |DataDirectory|, it should just work. Something is amiss but I'm not 100% sure what.
    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

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    Re: How to change DataBase localisation when publishing my app

    I don't get it too. For now I'm using the release folder to be able to run some tests on it.

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