Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQL Server Native Client 11.0 driver
Message
De
12/10/2020 15:57:52
Antonio Lopes (En ligne)
BookMARC
Coimbra, Portugal
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01676553
Message ID:
01676615
Vues:
35
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)
>>
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform