SQL Server 2005 Native Client + ADO + XML
I'm trying to implement SQLServer 2005 with mirror in two W2003 Servers. The application we use doesn't seem to work well with the SQLNCLI driver. When I execute a procedure that should return an XML result, I get something that looks like a binary/columned result. However, with the old connection string (not supporting mirroring), it works just fine.
Connection string NOT working OK:
Provider=SQLNCLI;Data Source=123.123.123.123;Database=PAT;UID=xxxxxx;PWD=xxxxxx;
Connection string working OK, but NOT supporting mirroring:
Driver={SQL SERVER};Server=123.123.123.123;Database=PAT;UID=xxxxxx;PWD=xxxxxx;
Results I get from the server when using SQLNCLI:
D?FechaInicialMuestreo?FechaFinalMuestreo?TotalTrx?NroProducto?ProdDescripcion?CodRespuesta?CodRespuestaDesc?PorActualIncidencia?NivelStandarPor?XS_CHECK_ERR?CONCEPTO????????
Results I should get, and do get if I use the old connection string:
<XS_CHECK_ERR FechaIn开发者_开发知识库icialMuestreo="2010-03-25T15:46:51.223" FechaFinalMuestreo="2010-03-25T16:21:12.753" TotalTrx="0"/>
The procedure is using code like sp_xml_preparedocument, SELECT ... FROM OPENXML, etc.
I don't know where else to look. The application was written in VC++ 6.0 using ADO ("ADODB.Connection").
Thanks for any tips.
OK, I've just found the answer here:
SQL Native Client does not contain XML integration. SQL Native Client supports SELECT … FOR XML queries, but does not support any other XML functionality. However, SQL Native Client does support the new SQL Server 2005 xml data type.
I'm now trying to find a way (if any) of using failover switching with old MSDASQL provider and {SQL Server} driver.
精彩评论