Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Help with ODBC error
Message
From
08/10/1998 17:58:31
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
 
 
To
08/10/1998 13:59:10
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00145135
Message ID:
00145246
Views:
32
The error is probably on the back end, since the message you are getting is fairly common SQL error.

Text is a variable-length ASCII text field, generally equivalent to a VFP Memo field. Char is a fixed-length character field, generally equivalent to a VFP Character field. ODBC will normally typecast Text to Memo and Char to Character.

If this error message is occuring intermittently I would look at the data itself first when the error occurs. Are you using Memo fields here? Are there characters (like CR/LF or TAB) in the SQL UPDATE/INSERT statement that would be suspect in a character field?

Also, you didn't indicate if you are using SQLPassThrough or remote views. With remote views you can explicitly typecast. Sometimes ODBC will do some funny things when creating the view and incorrectly cast something as something else. There's some info on the Knowledge Base about this stuff.

If this doesn't help at all you might want to post some more specifics.

Eric Shaneson
Cutting Edge Consulting

>Hi everybody: I am working with VFP 5.0 and SQL 6.5. I have a simply query store that I execute many times in the same day. I Always use 2 parameters to handle the errors in case I had one. This name are SqlNumberError and SqlError. The first one is integer and the second is Char. Sometimes the ODBC returns me the following error:
>
>"[Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from datatype 'text' to 'char' is not allowed.  Use the CONVERT function to run this query."
>
>I don't know why I receive this message, because I don't use Text or Char. Which is the difference? Does anyone know where is the error? Is in the Front End or in the Back End?
>Thanks in Advance!
>
>Roberto Comolli        e-Mail : RComolli@disco.com.ar
>Disco SA
>Larrea 847
>1117-Buenos Aires
>Argentina
Eric Shaneson
Cutting Edge Consulting
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform