PDA

Click to See Complete Forum and Search --> : HELP a UDL to connect a DataEnvironment


DatabaseLife
Feb 15th, 2000, 10:37 PM
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!

JHausmann
Feb 16th, 2000, 12:19 AM
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]

DatabaseLife
Feb 16th, 2000, 04:47 PM
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.