Every time i try to run this codei get the following error:
"'System.Data.DataRow.Protected Friend Sub New(builder As System.Data.DataRowBuilder)' is not accessible in this context because it is 'Protected Friend'.
"
this is my first time to insert using oledb and the With method.
Imports System.Data.OleDb
Public Class frmAddd
Dim daReservation As New OleDbDataAdapter()
Dim dsReservation As New DataSet()
''
''
Dim con As OleDbConnection
Dim SqlString As String = "INSERT INTO 12Testing (Name, Surname) VALUES ('" & Me.txtName.Text & "', '" & Me.txtSurname.Text & "')"
Dim data_base As String = " Data Source=;Initial Catalog=Testing_DB;User ID=;Password="
'con = New OleDbConnection(data_base)
'Dim conn As OleDbCommand = con.CreateCommand()
'con.Open()
'Dim cmnd As OleDbCommand = New OleDbCommand(SqlString, con)
'cmnd.ExecuteNonQuery() ' Execute the command here
'con.Close()
Dim dt As DataTable = dsReservation.Tables("12Testing")
Dim newRow As New DataRow
dt.Rows.Add(newRow)
With dt
.Rows(0)("Name") = txtName.Text
.Rows(0)("Surname") = txtSurname.Text
daReservation.Update(dsReservation, "12Testing")
End With