Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Passthroug
Message
From
29/08/2001 23:55:11
 
 
To
29/08/2001 21:38:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00550676
Message ID:
00550693
Views:
13
>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' + ")"
Previous
Reply
Map
View

Click here to load this message in the networking platform