I'm supporting a "legacy" application written in VFP, which uses DBF tables and is now migrating to SQL Server.
I created a table of tests in SQL, which contains fields of some basic types, to be able to work with the migration, performing tests of search, inclusion, change, etc.
The table has the following format:
CREATE TABLE [dbo].[teste](
[CpTexto] [varchar](50) NULL,
[CpData] [datetime] NULL,
[CpDataTime] [datetime] NULL,
[CpValor] [numeric](15, 5) NULL,
[CpInteiro] [int] NULL,
[ID] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
From VFP I am querying using SQLEXEC, with the following syntax:
lnNumConex = 1
lnSQL = [SELECT * FROM TESTE]
lnTmpCur = [CurTESTE]
= SQLEXEC(lnNumConex,lnSQL,lnTmpCur)
When I do SQLEXEC, SQL returns a cursor, with all fields contained in the TEST table, but the cpDATA field instead of a field in DATE format, it returns as a CHAR field.
Does anyone know what's going on?