Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC - INSERT INTO syntax question
Message
De
01/01/2002 06:44:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00599449
Message ID:
00599558
Vues:
28
Allan,
As Larry said it's not and if AutoTranslate is not in effect insertions are likely to fail. To be sure pass them in ODBC canonical format - YYYY/MM/DD hh:mm:ss. It's how SQL server expects via ODBC (convert() function's style 102)

For date(), datetime(), month(), day() etc you could use SQL server's Getdate(), datepart() etc functions.
Cetin

>Thanks Sergey. I didn't think it would be that simple.
>
>>>Now, I want to do the same thing with datetime and numeric fields. How would I handle inserting records with those data types using SQLEXEC?
>>The datetime value in SQL Server is represented by a character string.
...
>>strSQL = strSQL + Transform(lnNumber) + ", "
>>strSQL = strSQL + "'" + DTOC(ldDate) + "', "
>>strSQL = strSQL + "'" + TTOC(ltDatetime) + "', "
>>...
>>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform