Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with ODBC on MSQL 2000 back end
Message
From
14/08/2003 11:47:13
 
 
To
14/08/2003 11:36:44
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00820166
Message ID:
00820170
Views:
19
Hello,

The string you are trying to send is longer than the column width. A suggestion: if 'a' is a variable, check LEN(a) - it should be at most equual with the column widht. If 'a' is a value got from an editbox or textbox (let me put this in other words: if the user uses the interface to create that variable) make sure the property .MaxLenght of the editbox/textbox is as big as the column's width.

Hope this helps.


>Hi everybody
>
>I'am receiving from ODBC folowing message
>
>"String or binary data would be truncated", I have checked aError array and have got SQL STATE CODE 22001 - String data truncated (on right) on insert or update.
>
>Code is very simple:
>sSelect = "Insert into Table (Opis1) values('a') "
>a=sqlexec(gnHandle,sSelect)
>
>Mistery is that I get this message only if back end is MS SQL Server 2000. If i run same app. with MS SQL server 7.0 same code works normal.
>
>Regards
>
>Toni
Grigore Dolghin
Class Software.
Previous
Reply
Map
View

Click here to load this message in the networking platform