Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Navigation Paths never works : System.ArgumentException
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00906986
Message ID:
00907063
Views:
16
Actually, take a look at this code here instead, the other snippet had errors and I think I pasted twice.
Public Class Form1
    Inherits System.Windows.Forms.Form
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Private oDS As DataSet
    Private oWorkBC As BindingManagerBase

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()
        LoadData()
        BindData()

        'Add any initialization after the InitializeComponent() call

    End Sub

    Private Sub LoadData()
 
         oDS = New DataSet

        'Load data into DataSet
        Dim FsXML1 As New FileStream("Work.xml", FileMode.Open, FileAccess.Read)
        Dim FsXSD1 As New FileStream("Work.xsd", FileMode.Open, FileAccess.Read)
        'Load the schema into the DataSet
        Dim xtrXSD1 As New XmlTextReader(FsXSD1)
        oDS.ReadXmlSchema(xtrXSD1)
        xtrXSD1.Close()
        FsXSD1.Close()
        'Load the data into the DataSet
        Dim xtrXML1 As New XmlTextReader(FsXML1)
        oDS.ReadXml(xtrXML1)
        xtrXML1.Close()
        FsXML1.Close()
    End Sub

    Private Sub BindData()
        'Me.LblTask_Desc.DataBindings.Add(New Binding("Text", oDS, "work.task_desc")) 'CRASH
        Me.LblTask_Desc.DataBindings.Add(New Binding("Text", oDS.Tables("work"), "task_desc"))

        'Me.TxtComments.DataBindings.Add(New Binding("Text", oDS, "work.comments"))  'CRASH
        Me.TxtComments.DataBindings.Add(New Binding("Text", oDS.Tables("work"), "comments"))

        'Me.oWorkBC = Me.BindingContext(oDS,"work")  'CRASH
        Me.oWorkBC = Me.BindingContext(oDS.Tables("work"))
    End Sub
END Class
>thanks. I'll take a look and I'll let you know what I find.
>
>Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform