checkboxfield

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
joegass
Posts: 3
Joined: Wed 12 Jul 2006 07:32

checkboxfield

Post by joegass » Wed 12 Jul 2006 07:44

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 =?"
         >
            
                
                    
                       
                   
        

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 13 Jul 2006 08:06

We are fixing this problem. You will be notified on results as soon as possible.

joegass
Posts: 3
Joined: Wed 12 Jul 2006 07:32

Post by joegass » Thu 13 Jul 2006 16:39

Thanks a lot

joegass
Posts: 3
Joined: Wed 12 Jul 2006 07:32

Post by joegass » Thu 13 Jul 2006 16:41

I'm using mysql version '5.0.22-community-nt', if that makes a difference

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 20 Jul 2006 13:22

We will have fixed this problem by the next release.

daki
Posts: 11
Joined: Sat 18 Nov 2006 16:47

Boolean values do not show in gridview as a CheckBoxField

Post by daki » Sun 15 Jul 2007 08:06

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

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 16 Jul 2007 11:31

The problem in question pertains to SqlDataSource component, but you say you use ObjectDataSource. Could you please be more specific?

daki
Posts: 11
Joined: Sat 18 Nov 2006 16:47

Post by daki » Mon 16 Jul 2007 14:59

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.


























Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 18 Jul 2007 12:36

We are investigating this problem.
Look forward to hearing from me soon.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 20 Jul 2007 10:39

You need to use bit(1) data type instead of tinyint(1).

Post Reply