0

in below code there is syntax error in from Clause but i think every thing looks fine iam using access database thx and relation is fine between thes two table

Public Function GetGridData() As DataTable
        Dim dt As New DataTable
        Try
            Dim con As New Connection()
            Dim cmd As New OleDbCommand
            cmd.Connection = con.con
            cmd.Connection.Open()

             Dim da = New OleDbDataAdapter("SELECT tblBill.Description,tblBillDetail.CustomerName from tblBill join tblBillDetail on tblBill.Receipt=tblBillDetail.Receipt", con.con)
                        da.Fill(dt)

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Return dt

    End Function
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by jamshed ahmed
0

I think Access is a bit more picky and needs to be told explicitly what kind of JOIN you are performing.
I suggest that you use either INNER JOIN or OUTER JOIN instead of just JOIN.
For more detail I also suggest that you read up a bit about using JOINs in Access.

0

I think Access is a bit more picky and needs to be told explicitly what kind of JOIN you are performing.
I suggest that you use either INNER JOIN or OUTER JOIN instead of just JOIN.
For more detail I also suggest that you read up a bit about using JOINs in Access.

ok thx i have done it with ur suggestions

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.