Jump to content

Recommended Posts

Posted

Is there a way to connect to a SQL Server database using a pre-existing UDL file? Only one post in here with any mention of using a UDL, and that not helpful. Thanks!

Posted

Is there a way to connect to a SQL Server database using a pre-existing UDL file? Only one post in here with any mention of using a UDL, and that not helpful. Thanks!

ConnectionObject.ConnectionString = "File Name=C:\Path\To\UDL_File.UDL;"
  • 1 month later...
Posted

When I try this it returns an error. What am I doing wrong

$sqlCon = ObjCreate("ADODB.Connection")
$sqlCon.ConnectionString = "File Name=C:\Path\To\UDL_File.UDL;"
$sqlCon.Open

Before trying I downloaded the latest version, hopefully somebody can help me.

Thanks!

Posted

When I try this it returns an error. What am I doing wrong

$sqlCon = ObjCreate("ADODB.Connection")
$sqlCon.ConnectionString = "File Name=C:\Path\To\UDL_File.UDL;"
$sqlCon.Open

Before trying I downloaded the latest version, hopefully somebody can help me.

Thanks!

Exactly what is the error?

Do you have a COM error handler in your script? If so, what does it show?

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Exactly what is the error?

Do you have a COM error handler in your script? If so, what does it show?

:P

I didn't had a COM error handler yet. After adding this I saw the problem allready. "Error: Login failed for user '<user>'".

Stupid me forgot to save the password in the UDL file, it's working fine now.

Thanks for the quick advise.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...