Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQL Server Native Client 11.0 driver
Message
 
 
À
09/10/2020 13:50:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01676553
Message ID:
01676567
Vues:
29
Antonio,

Yes, I do use the CursorAdapter with CursorSchema enabled. Is this good or bad? :)

Thank you for the code that should help me with question 2. And you are correct, I am not looking for what SQL Server. But rather what specific driver is being use by my application, as it connects to the SQL Server.

>Dmitry,
>
>You're using CursorAdapter with CursorSchema enabled, right?
>
>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)
>
>
>
>
>>Hi,
>>
>>First, I am using CursorAdapter to connect and update SQL Server tables.
>>
>>I looked through some old messages and find the gurus (I don't want to name names) warning of not being able to use SQL Server Native Client 11.0 driver. One message says that this driver, when using the type VARCHAR(MAX) will return empty string. However, just a few days ago I replaced the driver SQL Driver with the SQL Server Native Client 11.0 driver (for an in-house application that I use every day). And I don't see a problem, the SQL Server type VARCHAR(MAX) returns to the VFP 9 application the value in the field. The type DateTime is correctly mapped to the DATE type in VFP 9.
>>So, I have two questions:
>>1. What am I missing in being able to use SQL Server Native Client 11.0 driver without a problem?
>>2. I create connection string based on the driver value in XML configuration file. And I see that I replaced the old ODBC driver with the Native Client Driver. Just in case, I miss something, can the VFP 9 code determine what is in fact the SQL server being used?
>>
>>TIA
"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