Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to get a field in related table
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01146540
Message ID:
01147393
Views:
21
Tony,

If you have a reference to the other bizobj, you can use the DataRow like this in C#:
lcDeptID = this.myBizobj.DataRow["DeptID"].ToString();
Or you can work directly with a DataSet like this:
lcDeptID = myDataSet.Tables["Pur_item"].Rows[0]["DeptID"].ToString();
Kind Regards,

Mat


>As I navigate through a dataset I want to save a value in a related table to a public variable.
>
>I have this part all right:
>Public Overridable Sub MyStateChangeHandler(ByVal bizObj As
> mmBaseBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
> Dim lnState As Integer
> lnState = oReqs.State
> If lnState = mmBusinessState.Navigated Then
> Dim lcDeptID as String
>
> 'But this part I can't figure out
> 'Somehow get the related row's field. Can't find anything in Help
> 'The related table is Pur_item, and the field is DeptID
> lcDeptID = Pur_item.DeptID
>
> Pur_item.gnDeptMMCID = lcDeptID
> End If
>End Sub
>
>I was able to get the field data by putting an invisible databound text box on the form, but that's not the best way to do it I don't think.
>
>Any suggestions on how I can do this?
>
>Thanks.
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Previous
Reply
Map
View

Click here to load this message in the networking platform