Welcome! Log In Create A New Profile

Advanced

[WD 21]SQL INSERT

Posted by ericus 
[WD 21]SQL INSERT
October 31, 2018 01:36PM
Good day

I have to use a database other than HFSQL so I am using ODBC to access this database.

One of the fields has to have a value of HEX 00 00 00. That is not the same as spaces and also not the same as NULL.

If I use another SQL editor and insert CHAR(0)+CHAR(0)+CHAR(0) into that field the HEX result is correct.

However if I use HExecuteSQLQuery from Windev passing "CHAR(0)+CHAR(0)+CHAR(0) for that one fields value the execution fail. If I pass " " or NULL it works but the HEX value for that field is then 20 20 20 which are spaces and not interpreted correctly by the application using that database.

Any idea what I can do?

I have tried using:

HExecuteSQLQuery(dsMyDataSource, hQueryDefault, sMyQuer)
HExecuteSQLQuery(dsMyDataSource, MyConnection, hQuerywithoutCorrection, sMyQuer)

Program fails with both attempts.

Thanks in advance.



Ericus Steyn
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: