468,110 Members | 1,841 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

Problem binding to CheckBox

Hi,

I am using an oledb data adapter to connect to an MSAccess 2003 database. I
use bindings on my windows forms to bind fields to the controls and for text
boxes and grids it has been fine.

I am having problems with binding to a check box. It works fine until I
attempt to add a new record to the dataset through the binding context
object.

The code that adds the new record to the dataset is listed below
Me.BindingContext(dsDataSet, TableName).EndCurrentEdit()

Me.BindingContext(dsDataSet, TableName).AddNew()

The add new statement generates the following error :

"DataBinding could not find a row in the list that is suitable for all
bindings"

If I remove the check box from the data binding - I can add the record ok.
The field it is binding to in the database is a Yes/No field.

Any help or insight will be much appreciated.

Cheers

Rodney Lane
Nov 20 '05 #1
2 2178
I see....
I thinks checkbox is not suitable for database binding,
althrouhg microsoft have promised that all the controls
can binding to database.
But ,you can try to do like this:before you want to add a
new record to the database,remove the checkbox from data
binding .And after you have succeed in Updating the
database,move the checkbox in again.I think it may be
works.
Sorry for my poor English.
Best Regards.

-----Original Message-----
Hi,

I am using an oledb data adapter to connect to an MSAccess 2003 database. Iuse bindings on my windows forms to bind fields to the controls and for textboxes and grids it has been fine.

I am having problems with binding to a check box. It works fine until Iattempt to add a new record to the dataset through the binding contextobject.

The code that adds the new record to the dataset is listed belowMe.BindingContext(dsDataSet, TableName).EndCurrentEdit()

Me.BindingContext(dsDataSet, TableName).AddNew()

The add new statement generates the following error :

"DataBinding could not find a row in the list that is suitable for allbindings"

If I remove the check box from the data binding - I can add the record ok.The field it is binding to in the database is a Yes/No field.
Any help or insight will be much appreciated.

Cheers

Rodney Lane
.

Nov 20 '05 #2
Thanks

I'll try that if i can find no other alternative

many thnaks

Rod.
"Menu Chen" <an*******@discussions.microsoft.com> wrote in message
news:0d****************************@phx.gbl...
I see....
I thinks checkbox is not suitable for database binding,
althrouhg microsoft have promised that all the controls
can binding to database.
But ,you can try to do like this:before you want to add a
new record to the database,remove the checkbox from data
binding .And after you have succeed in Updating the
database,move the checkbox in again.I think it may be
works.
Sorry for my poor English.
Best Regards.

-----Original Message-----
Hi,

I am using an oledb data adapter to connect to an

MSAccess 2003 database. I
use bindings on my windows forms to bind fields to the

controls and for text
boxes and grids it has been fine.

I am having problems with binding to a check box. It

works fine until I
attempt to add a new record to the dataset through the

binding context
object.

The code that adds the new record to the dataset is

listed below
Me.BindingContext(dsDataSet, TableName).EndCurrentEdit()

Me.BindingContext(dsDataSet, TableName).AddNew()

The add new statement generates the following error :

"DataBinding could not find a row in the list that is

suitable for all
bindings"

If I remove the check box from the data binding - I can

add the record ok.
The field it is binding to in the database is a Yes/No

field.

Any help or insight will be much appreciated.

Cheers

Rodney Lane
.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by mike | last post: by
4 posts views Thread by CaptRR | last post: by
11 posts views Thread by Rourke Eleven | last post: by
reply views Thread by Larry Serflaten | last post: by
1 post views Thread by Dean Slindee | last post: by
2 posts views Thread by Dean Slindee | last post: by
30 posts views Thread by dbuchanan | last post: by
reply views Thread by AleXmanFree | last post: by
3 posts views Thread by Gerrit | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.