Results 1 to 4 of 4

Thread: Simple Simple Data Environment Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Location
    US
    Posts
    115

    Smile Simple Simple Data Environment Question

    This is my first time using the Data Environment

    All I would like to do is instead of right clicking connection1 and going down to properties, and establishing a connection through there to my database.

    I would like to write the code out so that I will be able to use app.path command

    My purpose fo doing this is so that no matter where my project is it will never have problems finding the database.

    Thanks
    PinkPanther2070

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Location
    US
    Posts
    115

    Talking

    Does anyone know how to make a connection in the data environment via code

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Location
    US
    Posts
    115

    Red face

    Does anyone even know if this is possible?

  4. #4
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    Belgium/Antwerp
    Posts
    275
    It surely is possible,

    Run thru the properties of your data connection.
    You must find something like 'Connectionstring' or something like that.
    in this connectionstring, you will not only find the db path, but also the provider (Jet,ODBC,...).
    best way of finding this string thru code is:
    msgbox YourConnectionName.Connectionstring

    Then replace the path to your db in this string with app.path & "\YourDb"

    Hope it's clear enaugh

    Luc

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