Yes, -1 for True and 0 for false.

I would bet that the conversion from access changed boolean fields to
string fields. I would add a column for boolean values and then insert the
values based on the contents of the string field. Then drop the string
fields and rename the boolean columns. Then I think you'll get the proper
values from the database wrapper.

On Thu, Jul 16, 2015 at 7:50 AM, Martin McGlensey <mmcg29...@frontier.com>
wrote:

> Good Morning,
>
>
>
> I have a MySQL database containing data moved from Access. There are four
> checkbox fields containing text data (TRUE or FALSE). In my Gambas app
> these
> fields are contained in a datasource that supplies data to four
> datacheckbox
> controls. The app throws an error "Wanted integer but got string". I assume
> that means that the expression datacheckbbox1 = rstData!box1 returns a
> string when the datacheckbox is looking for an integer. Is this correct? I
> Is it -1 for true and 0 for false?
>
>
>
> If so what is the best way to correct this? Should I change the data from
> string to integer? Not so easy as it is a big table; lots of chance for
> error there. Should I convert the data to the proper value using a function
> (on Change) when the field is accessed or changed?
>
>
>
> Looking for the best way to do this with minimal risk to the data.
>
>
>
> Thank you for your help. All responses are appreciated.
>
>
>
> Regards,
>
> Marty
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to