Results 1 to 3 of 3

Thread: HELP a UDL to connect a DataEnvironment

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    I have to connect a DataEnvironment source to a UDL file.

    I have tried using the "FILE NAME=C:\CDBT.udl" in all sorts of ways. Various upper and lower cases, spacing. When compiled, a prompt for a DSN dialog comes up. You can't set the connection string to reach at design time because the connection (connect1) doesn't support ConnectionSource, only ConnectionString which is useless. I want to avoid hard coding the connection, but it looks like I may no alternative. I read at Deja news that some guy asked and had the same problem, in a subsequent post he said he got it to work, but didn't pass along how he came to solve it.

    So how can I use the Connect1 property to accept the "FILE NAME=C:\CDBT.udl" and connect like the other ADO objects?




    ------------------
    There's always hope!

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    Following works for me :

    [code]

    dim sTmp as string
    dim DB as ADODB.Connection


    sTmp="File Name=" & App.Path & "\filename.udl"
    DB.ConnectionTimeout=600 'oddly enough the value set in the udl file is overridden with a default of 15 _unless_ I do this

    DB.Open sTmp

    [\code]

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    This looks okay, but it opens a ADODB connection. What I want is for the DataEnvironment Designer to accept the connectionsource in the in the property diaglog for Connect1.

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