Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Date to SQL DateTime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01205160
Message ID:
01205471
Vues:
14
Hi Sergey
I get no error code back.. and it creates the records ok

Code is below and Doc_Date is a Dtae Time field in SqlServer
   myn = SqlExec(lnHandle,"Insert into Docs " +;
                      "(Doc_ref, Doc_Type, Doc_from, Doc_to, Doc_Compan, Doc_Claim, Doc_MeetWi,;
                       Doc_MeetAr, Doc_Subjec, Doc_Contac, Doc_Contnu, Doc_Safepa, Doc_Comm, Doc_relat,;
                       Doc_Transm,Doc_Val,Doc_date)" + ;
      " VALUES('" + F01 + "','" + F03 + "','" + F04 + "','"  + F05  + "','" + F06  + "','"  + F07 + "','" +;
                    F08 + "','" + F09 + "','" + F10 + "','"  + F14  + "','" + F15  + "','"  + F16 + "','" +;
                    F17 + "','" + F19 + "','" + F20 + "'," + STR(F18,10,2)  + "," +;
                    DTOC(DATE()) +;
                    ")")
>Hi Gerard,
>
>What error did you get with SPT parameter? What code do you use to create INSERT statement?
>
>>I have now got all fields, apart from date fields , populating Sql server ok.
>>When Inserting the Date field, I've used Dtoc() (the ? was giving an error)
>>It creates the record succssfully for good source dates but the date ending up in Sql server table os 01/01/1900 12:00
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform