I want to display multiple records from multiple table in datagrid
Please help me, How I will use the datagrid in vb.net

Recommended Answers

All 3 Replies

use join in your select statment

I want to display multiple records from multiple table in datagrid
Please help me, How I will use the datagrid in vb.net

You could do something like this

Try
            OPEN_CONNECTION

            dataAdapter = New OLEDBDataAdapter(YOUR_QUERY_WITH_JOIN_COMMAND, CONNECTION)

            commandBuilder = New OLEDBCommandBuilder(dataAdapter)

            dAdapter.Fill(dataTable)

            DATAGRIDNAME.DataSource = dataTable

        Catch ex As Exception
            SHOW_ERROR
        Finally
            CLOSE_CONNECTION
        End Try

what database in used?sqlserver or access?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.