.NET 1.1 and SQL Server native Client for SQL Server 2005
I have a .NET 1.1 applicat开发者_如何学Pythonion that currently connects to a SQL Server 2000 database server. This SQL Server is about to be upgraded to a SQL Server 2005 server with mirroring enabled. I have been trying to figure out if mirroring (i.e. automatic failover) is supported by .NET 1.1. I know that it is supported through the SQL Server Native Client but if I install this and then try to add a reference to sqlcnli.dll I get an error.
Just wondering if there is a SQL Server Native Client for .NET 1.1 and if so, does it support mirroring.
Thanks for your time,
ray.
What features of SQL Server Native Client are you needing that are not in the System.Data.SqlClient Namespace for .net 1.1? I would think mirroring should be transparent to the client. Here is a link to the System.Data.SqlClient Namespace documentation for .net 1.1
[http://msdn.microsoft.com/en-us/library/system.data.sqlclient%28VS.71%29.aspx][1]
EDIT
This link [http://technet.microsoft.com/en-us/library/cc917680.aspx][1]
Talks exactly about that. It seems to indicate that ado.net should support that connection string attribute.
Search the page for Client-side Redirect. I hope this has what you are looking for.
EDIT
It looks like the earliest version of ado.net that supports this is 2.0
EDIT
Try Useing System.Data.OleDb Namespace http://msdn.microsoft.com/en-us/library/ms131687.aspx
The SqlClient provider for .Net 1.1 is not mirroring aware. I would strongly recommend to upgrade the app to .Net 2.0. The .Net 2.0 SqlClient has full support for mirroring including Failover Partner.
In .Net 1.1 the only alternative is to replace the data access code on the client with OleDB or Odbc code. This is very intrusive, implies replacing all SqlConnection, SqlCommand, SqlDataAdapter and other components from System.Data.SqlClient with the equivalent OleDbConnection, OleDbCommand, OldDbDataAdapter or OdbcConnection, OdbcCommand and OdbcDataAdapter. Both OleDB and ODBC can use the Mirroring features, Odbc by specifying the failover partner in the connection string, OleDB by specifying the SSPROP_INIT_FAILOVERPARTNER property.
精彩评论