Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert DateTime to a string to send to SQL serv
Message
De
05/09/2010 10:28:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01480183
Message ID:
01480185
Vues:
54
>Hi,
>
>I want to send to the SQL Server the following update command:
>
>
>"update MyTable Set DateTimeColumn = " + TTOC(DateTime()) + " where Pk = " + nPk
>
>
>The TTOC() does not seem to do the job as SQL Server returns an error. What would be the right syntax for sending the current Date and Time to update SQL Serrver column?
>
>TIA.

I don't know SQL Server, but doesn't the syntax require some kind of delimiter for the date/time string? Something like quotation marks perhaps.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform