Page 1 of 1

checkboxfield

Posted: Wed 12 Jul 2006 07:44
by joegass
Hi, I'm trialing the mysqldirect to try and get asp.net 2.0 membership working, so far this has worked great.
I'm now trying to use a gridview to edit the membership table, but I can't seem to render the islockedout column in a checkboxfield.
I get the message "The data in the checkboxfield "islockedout" could not be parsed as a boolean value"

This table was created by your script "InstallWebTables.sql" and is of type tinyint.

Perhaps I should use another approach, some help on this would be appreciatted

Code: Select all

            
                
                
                   
            
        

        " 
        ProviderName="" 
        SelectCommand="SELECT aspnet_membership.* FROM aspnet_membership" 
        UpdateCommand="UPDATE aspnet_membership SET email =?, islockedout =? WHERE userid =?"
         >
            
                
                    
                       
                   
        

Posted: Thu 13 Jul 2006 08:06
by Alexey
We are fixing this problem. You will be notified on results as soon as possible.

Posted: Thu 13 Jul 2006 16:39
by joegass
Thanks a lot

Posted: Thu 13 Jul 2006 16:41
by joegass
I'm using mysql version '5.0.22-community-nt', if that makes a difference

Posted: Thu 20 Jul 2006 13:22
by Alexey
We will have fixed this problem by the next release.

Boolean values do not show in gridview as a CheckBoxField

Posted: Sun 15 Jul 2007 08:06
by daki
I am having the same issue and not sure what to do. Is this corrected in the new release? I just installed the latest release, so maybe I will need to rebuild my ObjectDataSource.

Thanks,
Dave

Posted: Mon 16 Jul 2007 11:31
by Alexey
The problem in question pertains to SqlDataSource component, but you say you use ObjectDataSource. Could you please be more specific?

Posted: Mon 16 Jul 2007 14:59
by daki
Ver 3.55.24.0 MySQLDirect.NET Data Provider
Ver. 1.70.28 MySQL Developer Tools
Ver. 5.2.22 MySQL Database
Ver 5.0.11 MySQL Client
Ver 2.0.50727 MS Visual Studio

I have a MySQL field that I want to be a boolean value and is defined as a TINYINT(1). A value of 0 is false and a value of 1 is true. I defined it as BOOLEAN but it actually gets defined as tinyint(1). In VS I drop a gridview on my web form and a wizard comes up and I select create a new datasource. I then select the Object data source icon and click OK and an ObjectDataSource is created. I then choose my table adapter that has a filter on the boolean value. The wizard next asks for parameters for the control to bind the parameter values for this boolean, parameter source is a control, controlID is Gridview1, default value of 0 and I click finish and now my gridview has an ObjectDataSource.

If I follow these exact same steps using a SQLServer Express database then when I compete the steps the gridview is shown with checkboxes instead of textboxes for the boolean field.

Below is the resulting Gridview markup. Notice the data type of Byte and Int16 for the field "completed". Also, if you look at the "Design" view you will see that no checkboxes were created for this field. Probably because it is not a boolean but a byte value type.


























Posted: Wed 18 Jul 2007 12:36
by Alexey
We are investigating this problem.
Look forward to hearing from me soon.

Posted: Fri 20 Jul 2007 10:39
by Alexey
You need to use bit(1) data type instead of tinyint(1).