I am having trouble getting a field (start_time) from a MSSQL 2000 table (Data type nvarchar) 20040204 00:01:27.803 to a FoxPro 7.0 Table That I want to use as a Date time field. When I change the data type in the foxpro table to DATETIME I either get no data in the start_time field. I though the CTOT would work but I can not figure where to use it or if It realy is correct
USE samupdate ORDER start_time IN 0
=STATMSG("Getting data from the M2K..."
sSQL="SELECT status,publication,subscriber,subscription_type,start_time,time,duration,comments,error_id,user_name"
sSQL=sSQL+" FROM tbldistribution_agent"
x=SQLConn("NetReports"
SQLExec(x,sSQL,"Updating"
SQLDisc(x)
=STATMSG("Updating the table..."
SELECT Updating
LOCATE
SCAN
m.publicatio=publication
m.subscripti=subscription_type
WAIT WINDOW NOWAIT "Updating Record "+ALLT(STR(RECNO()))+" of "+ALLT(STR(RECCOUNT()))
SCATTER MEMVAR
IF SEEK(start_time,"samupdate"
SELECT samupdate
GATHER MEMVAR
SELECT Updating
ELSE
INSERT INTO samupdate FROM MEMVAR
ENDIF
ENDSCAN
WAIT CLEAR
USE samupdate ORDER start_time IN 0
=STATMSG("Getting data from the M2K..."
sSQL="SELECT status,publication,subscriber,subscription_type,start_time,time,duration,comments,error_id,user_name"
sSQL=sSQL+" FROM tbldistribution_agent"
x=SQLConn("NetReports"
SQLExec(x,sSQL,"Updating"
SQLDisc(x)
=STATMSG("Updating the table..."
SELECT Updating
LOCATE
SCAN
m.publicatio=publication
m.subscripti=subscription_type
WAIT WINDOW NOWAIT "Updating Record "+ALLT(STR(RECNO()))+" of "+ALLT(STR(RECCOUNT()))
SCATTER MEMVAR
IF SEEK(start_time,"samupdate"
SELECT samupdate
GATHER MEMVAR
SELECT Updating
ELSE
INSERT INTO samupdate FROM MEMVAR
ENDIF
ENDSCAN
WAIT CLEAR