1
I am supporting a "legacy" application written in VFP, which uses DBF tables and now migrating to SQL Server.
I created a test table in SQL, which contains fields of some basic types, to be able to work with migration, performing search tests, 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 making queries 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 seeing a field in DATE format, it returns as a CHAR field.
Does anyone know what’s going on?