Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Passthroug
Message
De
29/08/2001 23:55:11
 
 
À
29/08/2001 21:38:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00550676
Message ID:
00550693
Vues:
12
>The following code give me a ODBC error for field "dateField" :
> "Error converting data type varchar to numeric"
>
>Why, if is a Date Field ?!!
>
> SQLCommand = "Insert into Mytable" + ;
> "(ccod_art, cDesc_art, dateField)" + ;
> "Values ('" + ALLTRIM(mytable.ccod_art) + "', '" +;
> ALLTRIM(mytable.cdesc_art) + "', '" +;
> '08-08-2001' + "')"
>
> SQLResult = SQLEXEC(nFileHand, SQLCommand)
>
>Thank you.

Is that a typo or are you doing double quotes for the date literal? (08-08-2001)
"', '" + '08-08-2001' + "')"
shouldn't it be:
"', " + '08-08-2001' + ")"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform