PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → NATIVE MSSQL + WD19
NATIVE MSSQL + WD19
Iniciado por guest, 22,ene. 2015 13:29 - 4 respuestas
Publicado el 22,enero 2015 - 13:29
Hey

I'M GOING CRAZY !!!:hot:


When i use HADD(FILENAME) all of a sudden i get the error:

Error 80040e21 returned by SQL Server
Description: Invalid character value for cast specification
SQL State: 22018
SQL Error Number: 0


But when i use the same values in a insert query there are no errors

Can some help me please

TIA
Jan de Bruin
Publicado el 22,enero 2015 - 13:46
Hi Jan

it looks like your analysis is not correct compared to the SQL DB, at the level of the type of at least one field

When you are doing an insert query, the query is in text and the engine is basically converting as needed, but when you are doing an hadd, the type of the fields is managed directly, and the "Invalid character value for cast specification" seems to say that one of the field value in your record cannot be stored by the type of field that is in the DB...

Best regards
Publicado el 25,enero 2015 - 11:01
Hey fabrice,

Thanks for your reply.
Things getting confuser for me...

Some values i can add without any problem. The values that gives an error don' t give an error In a insert query and with oledb also no problems. Why does i have problems with native acces problems ?

TIA
Jan de bruin
Publicado el 25,enero 2015 - 20:10
Hi Jan

I am not sure how to better explain it than what I said in my previous post:

When you are doing an insert query, the query is in TEXT and the engine is basically converting as needed (-which means no error-), but when you are doing an hadd, the type of the fields is managed directly and the HF engine is trying to put into the field a value that is NOT compatible on a binary level...

So that seems to indicate that you need to find WHICH field type is not correct and modify it either in your analysis OR in MSSQL... It's probably a very small difference too..

Best regards
Publicado el 25,enero 2015 - 20:28
Fabrice

Your explanation was correct and i did understand it.
:spos:
TIA
Jan