[Gambas-user] Re x2: Bool Data in MySQL (closed)

Nx GT-R BOY nxgtrturbo at ...626...
Fri Jan 18 00:21:13 CET 2008


Yes, I notice that strange behavior, I was expecting 0=false, and X>0=TRUE,
but I know now, I was designed BOOL data types with DBDesigner 4.054b (that
was translated to TinyINT UNSIGNED) so I dont need (Should I?) use the
Gambas database manager.

MySQL server is 5.0.38-Ubuntu (I have Freespire 2)

Regards,
Nx GT-R

>My personal suggestion is to use TINYINT in mySQL for TRUE/FALSE
requirements.
>I use: Zero is false and Not zero is true.
>We are converting from MDB (ACCESS) backend and ACCESS has problems and
complains
>if it is TINYINT UNSIGNED, so don't have it UNSIGNED because it likes -1
for FALSE.
>Other than that particular issue, Access front-end works fine.
>(...and yes, Gambas will replace Access front-end in the future...)
>-Fernando

> On jeudi 17 janvier 2008, Benoit Minisini wrote:
> > On jeudi 17 janvier 2008, Nx GT-R BOY wrote:
> > > Bool Data in MySQL
> > >
> > > Hi everybody, I am trying to change the value of a BOOL field with
Gambas
> > > but I cant, no matter how I try, the program always says "Invalid
value",
> > > I can manually insert "0" or "1", "TRUE" or "FALSE" values without
> > > problems from the mysql console, Is there any know issue about Bool
field
> > > with Datacontrols? Can I change the way the Datacontrols works with a
> > > given "field type" I mean, if my data type is BOOL, then the
DataControl
> > > becomes a DataCombo, I have had issues with DataCombos, so, do you
> > > recommend stop working with DataCombos?
> > >
> > >
> > > OS: Freespire 2.0.3
> > > Gambas: 2.0.0
> > > Components: gb, gb.chart, gb.db, gb.db.form, gb.form and gb.gui
> > >
> > > Nx GT-R
> >
> > Which version of mysql do you use?
> >
> > I was not aware of a BOOL datatype in mysql. I only saw integer
datatypes,
> > and, at the moment, the mysql driver uses the TINY integer datype for
> > representing boolean values.
> >
> > Regards,
>
> OK, I read the doc: BOOL is a synonymous of TINYINT(1), which is the MYSQL

> datatype used by the driver to make boolean values.
>
> Can you send me a mysql dump of your database?
>
> Anyway, you should create your database with the database manager to be
sure
> there is no problem. Did you do that?
>
> --
> Benoit Minisini


-- 
http://www.cardomain.com/ride/645756
http://nxgtrturbo.googlepages.com/
http://www.fotolog.com/nxgtrturbo/
http://tallerhuertas.googlepages.com/



More information about the User mailing list