Results 1 to 3 of 3

Thread: Data Enviroment

  1. #1

    Thread Starter
    Lively Member chongo 2002's Avatar
    Join Date
    Apr 2000
    Posts
    106

    Unhappy Data Enviroment

    How do you set the datasource with code in a data enviroment designer?

    What other values can you set in code?


    But i really need to know how to set the path so i can use the app.path property.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    If you are using an Access database (or even if you are not) you can change the Connection object inside the data environment to change things like the datasource (a.k.a Access db path).

    VB Code:
    1. 'here is an example using using Jet 4.0
    2. 'de is my dataenvironment
    3. 'common is my connection object
    4.     dim cnnStr as string
    5.     cnnStr = Split(de.Common.ConnectionString, ";")
    6.     cnnStr(1) = "Data Source=" & app.path &  "\Common.mdb"
    7.     de.Common.ConnectionString = Join(cnnStr, ";")
    8.     de.Common.Open

  3. #3

    Thread Starter
    Lively Member chongo 2002's Avatar
    Join Date
    Apr 2000
    Posts
    106
    Thanks man that is what i needed.

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