Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SQL Server Native Client 11.0 driver
Message
 
 
To
09/10/2020 13:50:10
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01676553
Message ID:
01676605
Views:
32
Antonio,

First, thank you again, for the code to get the SQL Server Driver "version" (your code below). It gives me much more than I ever had before. I have a question, just to help me understand something.

The value of m.DriverName is not complete Version I see in the ODBC Data Source Administrator. For example, if I use the SQL Server Native Client 11.0, the value is "1100.6518" And the value in the ODBC Data Source Administrator is "2011.110.6518.00". Is it because the Year in the version name (e.g. "2011") is not considered important?

>Regarding question #2, you're looking for what driver is being used, right? Not the SQL Server... If that is so, you can use the SQLGetInfo ODBC API function to query some driver info for a connection.
>
>
>DECLARE INTEGER SQLGetInfo IN ODBC32 ;
>	LONG ConnectionHandle, INTEGER InfoType, ;
>	STRING @ InfoValuePtr, ;
>	INTEGER BufferLength, INTEGER @ StringLengthPtr
>
>LOCAL DriverName AS String
>LOCAL StrLength AS Integer
>
>m.DriverName = SPACE(200)
>m.StrLength = 0
>
>SQLGETINFO(SQLGETPROP(m.YourODBCConnection, "ODBChdbc"), 7, @m.DriverName, 199, @m.StrLength)
>
>? LEFT(m.DriverName, m.StrLength)
>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform