Information générale
Titre:
How to fill timestamps in SAPDB/MAXDB from VFP 8.0
Hello Everybody !!
My application works with sql-pass-through against a sapdb/mawdb database! Dateformat = EUR
The database table has some timestamp fields (created,updated...)
In foxpro(8.0) with set date to german i do:
l_updated = datime()
l_..
l_..
L_cmd = "update ..... set x=?l_x,....,updated = ?l_updated"
sqlexec(connnr,l_cmd)
Everything works as expected, but the updated field in the tables is allways without milliseconds! '2004-11-30 14:01:07.000000'
I don't know how to fill the milliseconds from foxpro ?
I tried:
l_updated = ALLTRIM(TRANSFORM(DATE()) + " " + TRANSFORM(TIME(TIME())))
with the result '30-11-2004 14:01:07.98' but database error: datetime field overflow
this string has a wrong format !!!
I tried:
set date to ansi
l_updated = ALLTRIM(TRANSFORM(DATE()) + " " + TRANSFORM(TIME(TIME())))
set date to german
with the result '2004-11-30 14:01:07.98'
This works, but seems to be a very foolish solution !
Any ideas welcomed
Best regards
Albert
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement