Results 1 to 7 of 7

Thread: How to change DataBase localisation when publishing my app

  1. #1
    New Member
    Join Date
    Aug 12
    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
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,860

    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.

  3. #3
    New Member
    Join Date
    Aug 12
    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
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,860

    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.

  5. #5
    New Member
    Join Date
    Aug 12
    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
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,860

    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.

  7. #7
    New Member
    Join Date
    Aug 12
    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
  •