Imports ADODB Imports System.Data.OleDb Public Class Form1 Dim Cntemp As New ADODB.Connection Dim Rstemp As New ADODB.Recordset Dim Dataset1 As New DataSet Dim DataAdapter1 As New OleDbDataAdapter Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Cntemp.Open("Provider=Microsoft.ace.OLEDB.12.0; Data Source=" & Application.StartupPath & "\vbdata.accdb") Rstemp.Open("Select * From tbltemp", Cntemp, 1, 2) DataAdapter1.Fill(Dataset1, Rstemp, "tbltemp") dgv.DataSource = Dataset1.Tables(0) dgv.Rows.Add(10) End Sub
dgv.Rows.Add(10)
Dim dr As DataRow = dataset1.Tables(0).NewRow dgv.rows.add(dr)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)