Help required with bindingsource.find

M

Martin Horn

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top