Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert DateTime to a string to send to SQL serv
Message
De
10/09/2010 17:54:17
 
 
À
10/09/2010 14:02:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01480183
Message ID:
01480792
Vues:
53
As a parameter I believe it works (VFP does the conversion for you, I think). But as a value to set, it did not work, IIRC>

Hank

>>I use this successfully with SQL2005 and SQL2008:
>>
>>
>>...
>>lnRet = sqlexec(lnHandle,textmerge([update dFunkyTable set tLastTimeStamped = '<<TTOC(DATETIME(),3>>'])
>>
>>Hank
>>
>Have you tried just sending DATETIME() as the parameter?
>=sqlexec(lnHandle, "UPDATE mytable SET dtField = ?DATETIME() WHERE cid = ?myValue")
>
>works with MySql. I don't have any of the SQL Server versions to test with and am curious if it works there as well.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform