Help Needed in bindings,

  • Thread starter Thread starter Marc R.
  • Start date Start date
M

Marc R.

Hi all,

from the child side of the relation, I need to get a parent table's columns
value,

ex :

Customer use a curency (I store the Curency_ID into customer)

I need to retreive the Curency_Name from the Curency Table

How can I accomplish that ? (what fonction or Syntax).

Thanks a Lot to help a green Guy !

Marc R.
 
HI there,

If I understand you correctly you have 2 tables, Customer & Currency,
related via the currencyid.

How about:

SELECT x.currencyname FROM CUSTOMER c, CURRENCY x
WHERE c.currencyid = x.currencyid

If you were doing it for a particular customer possibly add another
condition such as

AND c.customerid = @mycustomerid parameter

Something like that?

Cheers, Joe :)
 
Thank you,

I tried to explain to you how close I was from the solution And I found it.

here's how I fix the problem.

dim I as interger
dim DRV as datarowview

for I = 0 to me.combobox.items.count -1
DRV = me.combobox.items.item(I)
if DRV.Item("cur_id") =
DVCustomer.item(me.grid_customer.currentRowIndex).Item("cur_id") then
me.combobox.selectedIndex = I
end if
next

I was going to tell you that ComboBox Items were DataRowview type, since
that Combobox will be always attach to the same dataview I know that que
column "cur_id" will always be to it so I don't event Cast it before using
it.

Thanks for you response, It wasn't part of the solution but you help me
anyway to resolve the issue.
 

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

Back
Top