如何INNER JOIN(2桌)

时间:2014-01-29 01:00:37

标签: sql vb.net

得到了一个小问题。我在这段代码中遇到错误:

  Private Search As New joiningDataContext

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtsearch.Click
        Dim SearchData = Search.SelectData(txtsearch.Text)

        DataGridView1.DataSource = SearchData

这是我的存储过程:

AS

    SELECT e.employee_id, e.first_name, e.last_name, e.middle_name, e.email, d.department_id, d.manager_id
    FROM employee_info AS e
    INNER JOIN departments AS d
    ON employee_info.employee_id=departments.department_id
    WHERE employee_info.employee_id=@employee_id

RETURN

它说,SelectData不是Windowapplication1.joiningDataContext的成员。 我怎么解决这个?提前谢谢..

0 个答案:

没有答案