|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help Needed in bindings,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 :) Show quoteHide quote "Marc R." <Nospam@NewgroupsONLY.com> wrote in message news:%23o9IyDjHGHA.376@TK2MSFTNGP12.phx.gbl... > 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. > > 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. Show quoteHide quote "Joe Van Meer" <jvanm***@eastlink.ca> wrote in message news:us08bdoHGHA.524@TK2MSFTNGP09.phx.gbl... > 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 :) > > > > > "Marc R." <Nospam@NewgroupsONLY.com> wrote in message > news:%23o9IyDjHGHA.376@TK2MSFTNGP12.phx.gbl... >> 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. >> >> > >
beginner question about classes
Excel Range will not put data into correct Cell Best approach - databound controls & ADO.NET Selecting combobox item at runtime from code No Beep with MSGBOX Possible? Convert Byte() to System.Drawing.Image? OT: Business Objects - what are they and can they contain objects like sockets? Cache problem string formatting DataGridView GotFocus |
|||||||||||||||||||||||