Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Navigation Paths never works : System.ArgumentException
Message
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Navigation Paths never works : System.ArgumentException
Miscellaneous
Thread ID:
00906986
Message ID:
00906986
Views:
46
Hi,

I'm using the Compact Framework to build a PPC application. As I'm starting in .NET I look a lot in the help file and everywhere they use Navigation Paths to all that's Binding, BindingContext and DataRelations. For exemple in the Data Binding section of the help they do this :
' Bind the DateTimePicker control by adding a new Binding. 
' The data member of the DateTimePicker is specified by a navigation path in the form:
' TableName.RelationName.ColumnName. 
DateTimePicker1.DataBindings.Add(New Binding("Value", ds, "customers.CustToOrders.OrderDate"))

' Get the BindingManagerBase for the Customers table. 
bmCustomers = Me.BindingContext(ds, "Customers")

' Get the BindingManagerBase for the Orders of the current
' customer using a navigation path: TableName.RelationName. 
bmOrders = Me.BindingContext(ds, "customers.CustToOrders")
However, when I try to use a navigation path, I always receive the following exception :

Run-time exception thrown : System.ArgumentException - ArgumentException

Like here, the first line crashes, but the second works :

obmWork = Me.BindingContext(oDS,"work")
obmWork = Me.BindingContext(oDS.Tables("work"))

However, from what I understand at least, I'm not able to use any relations without the navigation paths.
What I am doing wrong or not understanding ???

Thanks,
Sylvain Bujold
Next
Reply
Map
View

Click here to load this message in the networking platform