Saturday, February 25, 2012

ADODB and Mirrored SQL-Server

I did setup a Mirrored Database. Connecting from it using ADO.NET works well. It goes to the Mirror if the Principal fails.

But ADODB does not work. I get the error following error:

80004005 Invalid connection string attribute

When trying to connect to the DB in case the principal failed and the mirror is active. (MyProductiveDB is in failover state)

What do I do wrong?

Here is the code:

ADOConn = New ADODB.Connection

ADOConn.Open(CS)

CS is my Connections-String:

"Provider=SQLNCLI.1;Data Source=MyProductiveDB;Failover Partner=MyMirror;Initial Catalog=MyCat;Persist Security Info=True;User ID=MyUser;Password=xxxxxx;Pooling=True;Connect Timeout=5;Application Name=MyApplic"

Remark: When I try to add "Network Library=dbmssocn" to the connection String, I get the same error, even if the Principal is active.

Your help is very much appreciated.

Beat

I contacted the client team and they pointed out that Pooling is not supported in SQLNCLI.

Regards,

Matt Hollingsworth

Sr. Program Manager

Microsoft SQL Server

|||

Beat,

Do you mind if I ask for a sample of your ADO.NET code that works well if the principal fails?

Thank you very much.

|||?

No comments:

Post a Comment