03-07-2017 05:40 PM
sprintf(szConnStr, "Server=%s;Database=%s;Provider=SQLXMLOLEDB.3.0;"
"Data Provider=SQLOLEDB;Initial Catalog=%s", pszSvrName, pszDb,pszDb);
I got error -2147352567 when call ADODB_ConnectionOpen.
TIA
03-08-2017 10:12 AM
Hi Zou,
Can you post any more context? If this is occurring in CVI with an ActiveX control, this knowledgebase article may be relevant:
Why Do I Get Error -2147352567 When Opening a VI Using Active-X in LabVIEW
http://digital.ni.com/public.nsf/allkb/7BB7805980B62383862572BA00568D5E?OpenDocument
If you could post code or clarify where this function call is being used, we may be able to get a better idea of what's causing the error.
03-08-2017 02:30 PM
Thanks for reply.
I'm using CVI, not LabVIEW. So there is no VI ref.
ADODB_ConnectionOpen is inside ADO_Driver.fp
Before I call this function, I called ADODB_New_Connection.
No error, and the return ref is a valid number.
I think the problem is missing ADO component.
Don't know where I can get one compatible with Windows 2012 Server.
03-09-2017 04:25 PM
Hello George,
Is this helpful?
Microsoft ADO.NET for SQL Server
https://docs.microsoft.com/en-us/sql/connect/ado-net/microsoft-ado-net-for-sql-server
This is the best thing I could find for an ADO .NET driver.