Results 1 to 4 of 4

Thread: Path question.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    24

    Path question.

    Hey all.

    I have a VB program that links to a database using ADO. I'm not coding my connection string just using the properties dialog box. Under the connection tab I just have the name of the database not the full path . I do this because some times I use a different computer or move the application folder. My problem is that I have a menu command that opens up a common dialog box to choose a wave file. The wave files are in a folder in the application directory. When I do this it causes the connection to look in the wave folder and of course the DB is not there. I guess since I just have the name of the DB in the database field it doesn't know exactly where to look and just looks in the last folder accessed. Is there a way to force it to use a relative path (I have done this in other sections of my program with App.path & "file name") in the properties dialog box??

    Sorry for the confusing post. Hope someone understands this and knows the answer.

  2. #2
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    269

    Re: Path question.

    Im not sure to fully understand...

    Only relative folders that i know are app.path and windows directory.

    If the DB is always in the application folder then why arent you using App.path & "file name"?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    24

    Re: Path question.

    I'm trying to do this in the properties box not using code. The app.path doesn't work (or I'm not doing it right) in the properties box.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Path question.

    When you say "using ADO", do you actually mean that you are using the dreaded (ADO) data control?

    If so, you may be able to use "app.path" via code, and then refresh the data control (for help on that bit, see the relevant part ofthe DB FAQ [link below]).

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