Imports System.Data.OleDb
Public Class Form1
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\WindowsApplication1\WindowsApplication1\bin\Debug\POSSYTEM.accdb")
Dim cmd As New OleDbCommand
Dim da As New OleDbDataAdapter
Dim dt As DataTable
Dim ds As New DataSet
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
conn.Open()
dt = New DataTable
ds = New DataSet
ds.Tables.Add(dt)
da = New OleDbDataAdapter("SELECT FROM Sales inner join PaymentMethod on Sales.PaymentMethod=PaymentMethod.Paymentype", conn)
da.Fill(dt)
DataGridView1.DataSource = dt.DefaultView
conn.Close()
End Sub
End Class
Tag : Ms Access, MySQL, VB.NET, VS 2015 (.NET 4.x), Windows
Imports System.Data.OleDb
Public Class Form1
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\WindowsApplication1\WindowsApplication1\bin\Debug\POSSYTEM.accdb")
Dim cmd As New OleDbCommand
Dim da As New OleDbDataAdapter
Dim dt As DataTable
Dim ds As New DataSet
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
conn.Open()
dt = New DataTable
ds = New DataSet
ds.Tables.Add(dt)
da = New OleDbDataAdapter("SELECT * FROM Sales inner join PaymentMethod on Sales.PaymentMethod=PaymentMethod.Paymentype", conn)
da.Fill(dt)
DataGridView1.DataSource = dt.DefaultView
conn.Close()
End Sub
End Class