With DataEnvironment1
If .Connection1.State <> 0 Then
.Connection1.Close
End If
.Connection1.Open "File Name=c:\fred.udl;"
End With
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
Are you using the full path to your UDL? - the one above works for me.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
I get this error if I delete the connection string from DataEnviroment.
It works only if the connection string in my DataEnviroment & through code are same, ie if specify
"File Name=c:\fred.udl" at both the places, in DE & in Code as well. If I remove this from DE & keep only in code, it gives me the runtime error.
I don't mind to keep in both the places, so now it works for me.
Thanks again for ur kind help. U can also try this removing the Connection String from DE and keeping the code only.
Although I set "File Name=c:\Elepost.udl" is in both the places ie at DataEnviroment and in the code, still gives me the run time error when i try to set the connection string property through code.
Dim DE As New DataEnvironment1
DE.Connection1.ConnectionString = "File Name=" & App.Path & "\Elepost.udl"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.