Hi,
I am trying to connect to MSAccess2000 database thru VB.net.I get the error at the myconnection.open().
Here is my code.
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
Try
Dim MyConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Neelima\office\serp.mdb"
MyConnection.Open()
Dim MyCommand As New OleDb.OleDbCommand("SELECT * FROM serpmaster", MyConnection)
Dim MyReader As OleDb.OleDbDataReader = MyCommand.ExecuteReader()
TextBox1.Text = ""
'TextBox2.Text = "" ' Clear all text first before entering loop
While MyReader.Read
TextBox1.Text += MyReader("StudID"
TextBox1.Text += MyReader("Title"
TextBox1.Text += "==========End Of Record=========" ' Just to space
End While
MyConnection.Close()
MyReader.Close()
MyCommand.Dispose()
Catch e As OleDb.OleDbException
MsgBox(e.ToString())
Finally
End Try
Here is my error message.
System.data.oledb.oledbconnection: Could not find installable ISAM
at System.data.oledb.oledbconnection.Processresults(int32hr)
at System.data.oledb.oledbconnection.intializeprovider()
at System.data.oledb.oledbconnection.open()
at windowsapplication6.form1....ctor() in c:\......
ThanK you
Neelima
I am trying to connect to MSAccess2000 database thru VB.net.I get the error at the myconnection.open().
Here is my code.
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
Try
Dim MyConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Neelima\office\serp.mdb"
MyConnection.Open()
Dim MyCommand As New OleDb.OleDbCommand("SELECT * FROM serpmaster", MyConnection)
Dim MyReader As OleDb.OleDbDataReader = MyCommand.ExecuteReader()
TextBox1.Text = ""
'TextBox2.Text = "" ' Clear all text first before entering loop
While MyReader.Read
TextBox1.Text += MyReader("StudID"
TextBox1.Text += MyReader("Title"
TextBox1.Text += "==========End Of Record=========" ' Just to space
End While
MyConnection.Close()
MyReader.Close()
MyCommand.Dispose()
Catch e As OleDb.OleDbException
MsgBox(e.ToString())
Finally
End Try
Here is my error message.
System.data.oledb.oledbconnection: Could not find installable ISAM
at System.data.oledb.oledbconnection.Processresults(int32hr)
at System.data.oledb.oledbconnection.intializeprovider()
at System.data.oledb.oledbconnection.open()
at windowsapplication6.form1....ctor() in c:\......
ThanK you
Neelima