Join from sqlce database RRS feed

  • Question

  • I am trying to get some data from 2 Tabels in a sqlce database and put it in a datagridview

    Trying this but i gives an error.

    The plan is to search on Reisnr and not on Id , Id is not the same in the 2 Tabels  and Reisnr  (is a number of the journey )

    For example journey nr 14 is present in both 

     cmd = New SqlCeCommand("Select Reisnr, Subnr, Plaats, Kgladen, Bestemming, From Laden
                Select Reisnr, Subnr, Kgbdn, Plaats, From Lossen", con)
            If con.State = ConnectionState.Closed Then con.Open()
            myDA = New SqlCeDataAdapter(cmd)
            myDataSet = New DataSet()
            myDA.Fill(myDataSet, "MyTable")
            DataGridView4.DataSource = myDataSet.Tables("MyTable").DefaultView

    The error

    This is a small example of some Columns of Laden and Lossen

    Thursday, November 29, 2018 10:53 AM


All replies