Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQL Server Native Client 11.0 driver
Message
 
 
À
12/10/2020 15:57:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01676553
Message ID:
01676616
Vues:
36
Antonio,
Thank you for your reply. I did try parameter 6 and get the DLL name. But I prefer the version number (even in an abbreviated form) since it will tell me much more.
Thank you very much!

>Dmitry, that's the info you'll get from the driver (you can also try the InfoType parameter set to 6, this will give you the name of the driver's filename). Other info that might interest you would probably come from the driver registry's deployment information.
>
>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform