[Gambas-user] PRB:Connection.Exec()

Ron Onstenk ronstk at ...239...
Wed Jun 7 17:13:03 CEST 2006


On Wednesday 07 June 2006 14:15, nigel at ...38... wrote:
> 
> Ron,
> I believe that the documentation is incorrect and that the request should just be a standard SQL statement, the only different thing is that you can parameterize some of the fields and then pass them as arguments. So your first attempt is the correct syntax. Have you tried where enabled = `true`.
> 
> Setting DB.Debug = True before the exec statement may give you information on what is being passed to the database.
> 
> Regards
> 
> Nigel
> 

Thanks Nigel,

As I used it already in other project I did know my first should be the correct one.
Because I did get the error I did look in the doc and found the difference.

I do believe the major problem is when people declare a field as boolean 
they assume with good faith it is also in the (MySQL) table as boolean.

The "enabled = `true`" I have try it but also an error occurs.
Simple by that the field in the (MySQL) table is not boolean but tiny integer.

DB.Debug = True shows me the sql line and that was valid syntax but the server
could not match a boolean true/false on tiny integer found with phpMyAdmin.

The difference shall have to do with the other database engines as SQLite, etc

Using 1/0 for true/false works but knowing that I should not have declare the 
fields in the past (5 years back, no gambas at that time exists) with boolean. :)

One thing I want to know. Is the Connection.Exec 100% transparent to the MySQL
server, without intervention in the SQL line by gambas.


Greets from,
Ron




More information about the User mailing list