Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL ODBC driver compatibility
Message
 
À
02/09/2015 15:34:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01623958
Message ID:
01624208
Vues:
66
J'aime (1)
>Hi Jeff,
>
>that is not my experience, on production systems running for several years now. We haven't used the SQL2000 driver since 2005 came out.
>
>The difference, I believe, is that we map types in the DBC (can also be done with a cursoradapter).
>
>Hank

Hank,

Sure, I suppose mapping types via DBC remote views or using the cursoradapter works, but we're using a dataclass that eventually uses SQLEXEC() and we only see whatever the SQL Driver we've picked returns.

We have hundreds of tables in about 12 different databases and some are in MySQL. Rewriting to use the cursoradapter at this point is out of the question, especially since we're rewriting the whole thing in .NET anyway.

It's interesting to note the differences that SQLCOLUMNS() returns using the SQL Server 6 (older driver) versus the Native Client 10 or 11 against varchar(MAX). The SQL Server 6 driver sees varchar(MAX) as a TEXT data type and therefore maps it as a Memo. The Native clients see varchar(MAX) as varchars, but the width of the column is 0 (zero), thus it comes down as character without data.

For Date and Datetime2 the SQL Server 6 driver returns a Data_type of -9 and the Native Drivers return 9 and 11, respectively. In the Type_name column all drivers return the correct SQL data type (Date or Datetime2), but my guess is that VFP uses the numeric Data_type column to determine what kind of bucket to put the data in. It's all about the buckets that VFP builds when using ODBC. Maybe, as you say, you can change that behavior using the cursoradapter.

Interesting stuff!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform