473,413 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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 2799
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
4
by: CaptRR | last post by:
Well, it seems as though every time I fix one problem I make yet another. Anyhow, this is probably an easy one but I haven't found any answers doing a search so I figured I would ask it here. I...
11
by: Rourke Eleven | last post by:
I have looked and searched. What good is the databind property on Radiobuttons? How does one go about actually using it? What is a good resource on this? I understand that I can easily get/set...
0
by: Larry Serflaten | last post by:
I am not sure how many are aware of this sort of data binding, but as it is new to many (classic) VB developers I thought I would post this once just to let people know of its availablility. ...
1
by: Dean Slindee | last post by:
Can someone explain how to remedy the two late binding errors below when Option Strict On: Public Function ControlDataRowArrayListPaint(ByRef frm As Form, _ ByRef ctl As Control, _ ByRef...
2
by: Dean Slindee | last post by:
Can someone explain how to remedy the two late binding errors below when Option Strict On: Public Function ControlDataRowArrayListPaint(ByRef frm As Form, _ ByRef ctl As Control, _ ByRef dr...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
0
by: AleXmanFree | last post by:
Hi, I have this kind of problem, In my asp.net page i use DataList and user control that is repeated in DataList. This user control has in it a checkbox , so everytime user clicks on checkbox...
3
by: Gerrit | last post by:
Hi, I try to learn programming in c# with databinding controls. Now I have a problem with a ComboBox with the advanced properties for databinding, I want to set the DataSourceUpdateMode to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.