Question: OleDBconnection is reporting an error that it is not defined. How do I fix this? Imports System.Data.OleDb Public Class Form1 Dim myConnString As String =
OleDBconnection is reporting an error that it is not defined. How do I fix this?
Imports System.Data.OleDb Public Class Form1
Dim myConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Environment.CurrentDirectory & "\Risks.mdb"
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim myConnection As New OleDbconnection(myConnString) myConnection.open()
End Sub
End Class

Imports System.Data.OleDb 2 references Public class Form1 Dim myConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Environment.CurrentDirectory & "\Risks.mdb" O references Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub O references Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim myConnection As New OleDbconnection (myConnString) myConnection.open() 10 11 12 13 13 14 15 16. 16 17 18 End Sub End Class Imports System.Data.OleDb 2 references Public class Form1 Dim myConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Environment.CurrentDirectory & "\Risks.mdb" O references Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub O references Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim myConnection As New OleDbconnection (myConnString) myConnection.open() 10 11 12 13 13 14 15 16. 16 17 18 End Sub End Class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
