General information
Title:
Can you use SET DATE over VFP ODBC driver
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)
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only