[Gambas-user] Checkbox

Charlie karl.reinl at ...9...
Fri Feb 27 21:04:30 CET 2004


Jack schrieb:

>Bonsoir Charlie, Bonsoir Gambers,
>
> I would like to be more understandable but my english is very poor !
>
> I have a screen with a checkbox which return a Gambas boolean value (true or 
>false )OK ? My problem is how to write this value in an MySQL field ?  This 
>example: My_data = '" & my_checkbox.value & "' don't work !
>
>Thank you for your help.
>
>°~Jacky~°
>  
>
Salut Jacky,

I had a look to my older project where I comunicated by  shell/exec 
commands.
And there I did it by converting TRUE to 'Y' and FALSE to 'N'.
You try to write 'TRUE' or 'FALSE'
Have you tried
My_data = my_checkbox.value

if that doesn't work
Try to convert it to 'Y' or 'N' by passinig by an Function

My_data = conv2Str(my_checkbox.value)

Function conv2Str(bIn as boolean) as string
DIM sRet as string
    if bIn then
        sRet='Y'
    else
        sRet='N'
    endif
    return sRet
end

Sorry that Code is not tested,I just wrote him in the mail program.

But I have a question too.
Why are you calling my name ?

Amicalement
Charlie






More information about the User mailing list