[Gambas-user] Wrong variable type returning from PostgreSQL resultset
Constantin Teodorescu
brailateo at gmail.com
Sun Mar 13 13:32:52 CET 2022
My program worked perfectly on Gambas 3.14.3 version on Ubuntu Linux 20.04
64 bit
I have copied the program on a Linux Mint 20.2 with Gambas 3.17.0 installed
and got an error running it.
When debugging it I discovered that value returned by a resultset on an id
(serial) column is no longer integer but STRING! :-o
rst2 = Connections["PgDB"].Exec("SELECT * FROM companies")
. . .
If rst2["id"] <= someInteger Then <= Error here
...
The error is: "Type mismatch: wanted integer, got String instead
I managed to cheat it with
If Val(rst2["id"]) <= someInteger Then
but it should be properly fixed in the next Gambas version!
Best regards,
Constantin Teodorescu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220313/f8cc972d/attachment.htm>
More information about the User
mailing list