Hello, can anyone help me figure out this? I've created a dataset and two datatables, i've added both to the dataset, with no errors from the debugger. But when i try to establish a datarelation between the two datatables, i got an error "datatable is not a member of system.data.dataset".
I don't figure out what i've made wrong...
If it helps, here goes a litle code
later,
some help would be apreciated, i'm just a beginner...very beginner
I don't figure out what i've made wrong...
If it helps, here goes a litle code
VB.NET:
Public Class CalcEixo
Dim ObraDataSet As New DataSet()
Dim Tipo As String = ""
Dim Pkini As Double
Dim Pkfin As Double
Dim pk_n As Double
Dim pk_f As Double
Dim Pkcurr As Double
Dim ligacao As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= c:\obra.mdb;"
Dim CN As New OleDb.OleDbConnection(ligacao)
Dim drCurr As DataRow
Public Sub Calcular_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calcular.Click
Dim dtCotasEixo As New DataTable()
ObraDataSet.Tables.Add(dtCotasEixo)
Dim dtList As New DataTable("dtList")
With dtList
.Columns.Add("Pk")
.Columns.Add("M")
.Columns.Add("P")
.Columns.Add("Z")
.Columns.Add("Rumo")
End With
ObraDataSet.Tables.Add(dtList)
later,
VB.NET:
Dim dtList1 As DataTable = ObraDataSet.dtList
Dim dtCotasEixo1 As DataTable = ObraDataSet.dtCotasEixo
Dim dtListPk As DataColumn = dtList.Columns("Pk")
Dim dtCotasEixoPk As DataColumn = dtCotasEixo.Columns("Pk")
Dim DR As DataRelation
DR = New DataRelation("xyz", dtListPk, dtCotasEixoPk)
Dim novalinha As DataRow
For Each novalinha In dtList(0).GetChildRows("xyz")
MsgBox(novalinha.Item(1).ToString)
Next
some help would be apreciated, i'm just a beginner...very beginner