By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

Help required with bindingsource.find

P: n/a
Hi all,

I want to use the find method of a binding source to set it's position.

I can get it to work with a binding source that is bound directly to a
table, but not with one that is bound to a relation.
For example:

I have a dataset called MainDataSet with two tables called Customers and
Orders respectively and I have set a relation between the two tables.

CustomersBindingSource is bound directly to the Customers Table, whilst
OrdersBindingSource is bound to the relation between the Orders table and
the Customers table.

Does this make sense? I don't know if I have worded it correctly.

CustomersBindingSource.Find("CustomerID" , 1) for example, works as
expected.

But OrdersBindingSource("OrderID", 1) throws an exception 'DataMember
property 'OrderID' cannot be found on the DataSource.' There is definitely
an OrderID field in the table, it fails on any field name that I specify.

I know I must be missing something obvious can anyone point me in the right
direction.

Kind reagrds,

Martin.

Feb 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Don't worry I have sorted it.

"Martin Horn" <mv****@theinternet.com> wrote in message
news:cX******************@newsfe6-gui.ntli.net...
Hi all,

I want to use the find method of a binding source to set it's position.

I can get it to work with a binding source that is bound directly to a
table, but not with one that is bound to a relation.
For example:

I have a dataset called MainDataSet with two tables called Customers and
Orders respectively and I have set a relation between the two tables.

CustomersBindingSource is bound directly to the Customers Table, whilst
OrdersBindingSource is bound to the relation between the Orders table and
the Customers table.

Does this make sense? I don't know if I have worded it correctly.

CustomersBindingSource.Find("CustomerID" , 1) for example, works as
expected.

But OrdersBindingSource("OrderID", 1) throws an exception 'DataMember
property 'OrderID' cannot be found on the DataSource.' There is definitely
an OrderID field in the table, it fails on any field name that I specify.

I know I must be missing something obvious can anyone point me in the
right direction.

Kind reagrds,

Martin.


Feb 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.