Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you use SET DATE over VFP ODBC driver
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Can you use SET DATE over VFP ODBC driver
Divers
Thread ID:
00455729
Message ID:
00455729
Vues:
60
Is it possible to use SET DATE over VFP ODBC Driver?
I am trying to get a list of projects with their associated dates, in date order, from a projects table in Foxpro 2.6 format. The date field datatype is of Char format and cannot be changed to date type for particular reasons.

The problem relates to using DTOC() in the query (See code below). The resultant cursor contains blank or otherwise wrong date values which I'm sure are related to the DATE format/region environment variable. In interactive mode, I SET DATE to British and it solved the problem. Is it possible to use SET DATE over ODBC (The ODBC Docs don't mention that the ODBC driver supports SET DATE.)

ASP Code

SET objConn = Server.CreateObject("adodb.connection")
strConnection = "DSN=ERSData"
objConn.Open strConnection

strQuery = "SELECT CTOD(inbuild2) AS inbuild2, qty FROM project"
strQuery = strQuery & " ORDER BY 1"

objConn.Execute(strQuery)
Répondre
Fil
Voir

Click here to load this message in the networking platform