[Gambas-user] Bool Data in MySQL

nando nando_f at ...951...
Thu Jan 17 20:41:04 CET 2008


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




---------- Original Message -----------
From: Benoit Minisini <gambas at ...1...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Thu, 17 Jan 2008 14:37:46 +0100
Subject: Re: [Gambas-user] Bool Data in MySQL

> 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
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list