Imports System.Data.OleDb Public Class Form1 Dim connc As Ne.pdf
fantabulustredingco
11 views
2 slides
Oct 04, 2023
Slide 1 of 2
1
2
About This Presentation
Imports System.Data.OleDb
Public Class Form1
Dim connc As New OleDbConnection
Dim cmd As OleDbCommand
Dim tb As New DataTable
Dim da As New OleDbDataAdapter
Private Sub Form1_load(sender As Object, e As EventArgs) Handles MyBase.Load
connc.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;D...
Imports System.Data.OleDb
Public Class Form1
Dim connc As New OleDbConnection
Dim cmd As OleDbCommand
Dim tb As New DataTable
Dim da As New OleDbDataAdapter
Private Sub Form1_load(sender As Object, e As EventArgs) Handles MyBase.Load
connc.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=
C:\Users\ILUNGELOLETHU LAPTOP\source\repos\WindowsApp3\RUGBY.accdb"
End Sub
Private Sub btnSAVE_Click(sender As Object, e As EventArgs) Handles btnSAVE.Click
Try
connc.Open()
cmd = connc.CreateCommand()
cmd.CommandType = CommandType.Text
cmd.CommandText = "insert into RUGBY
(PlayerID,Player,Team,Games,Points)Values('" + txtPlayerID.Text + "' ,'" + txtPlayer.Text + "',
'" + txtGames.Text + "','" + txtPoints.Text + "')"
cmd.ExecuteNonQuery()
connc.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click
Try
connc.Open()
cmd = connc.CreateCommand()
cmd.CommandType = CommandType.Text
da = New OleDbDataAdapter("SELECT Team FROM RUGBY", connc)
da.Fill(tb)
ListBox1.DataSource = tb
connc.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
please help,
i am getting this error code when connecting to ms access database i install the plugins and also
download but still The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local
machine..
Size: 9.47 KB
Language: en
Added: Oct 04, 2023
Slides: 2 pages
Slide Content
Imports System.Data.OleDb
Public Class Form1
Dim connc As New OleDbConnection
Dim cmd As OleDbCommand
Dim tb As New DataTable
Dim da As New OleDbDataAdapter
Private Sub Form1_load(sender As Object, e As EventArgs) Handles MyBase.Load
connc.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=
C:\Users\ILUNGELOLETHU LAPTOP\sourceepos\WindowsApp3\RUGBY.accdb"
End Sub
Private Sub btnSAVE_Click(sender As Object, e As EventArgs) Handles btnSAVE.Click
Try
connc.Open()
cmd = connc.CreateCommand()
cmd.CommandType = CommandType.Text
cmd.CommandText = "insert into RUGBY
(PlayerID,Player,Team,Games,Points)Values('" + txtPlayerID.Text + "' ,'" + txtPlayer.Text + "',
'" + txtGames.Text + "','" + txtPoints.Text + "')"
cmd.ExecuteNonQuery()
connc.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click
Try
connc.Open()
cmd = connc.CreateCommand()
cmd.CommandType = CommandType.Text
da = New OleDbDataAdapter("SELECT Team FROM RUGBY", connc)
da.Fill(tb)
ListBox1.DataSource = tb
connc.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
please help,
i am getting this error code when connecting to ms access database i install the plugins and also
download but still The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local
machine.