how to do the .net program using MSaccess

hemabala

New member
Joined
Apr 7, 2006
Messages
3
Programming Experience
Beginner
:confused: i have create a small program using MSaccess, but when i run this coding it doesn't work, and the data is not there, i don't know what's the problem in there. can anyone PLEASE tell me what I am doing wrong or proint me in the right direction

the error message is:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll
Additional information: The 'micosoft.jet.oledb.4.0' provider is not registered on the local machine.

and it's highlight con.open() is wong



PrivateSub btnshow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshow.Click
'set the connection
Dim constring AsString = "provider=micosoft.jet.oledb.4.0; data source=E:\WindowsApplication2\airport.mdb"
Dim conn As OleDbConnection = New OleDbConnection(constring)
con.Open()
'Select Case Data
Dim comm As OleDbCommand
'assign the data to data adapter
Dim da As OleDbDataAdapter = New OleDbDataAdapter
da.SelectCommand = comm
' declear the data set
Dim ds AsNew DataSet
da.Fill(ds, "DETAILS")
TextBox1.DataBindings.Add("text", ds, "AIRPORT")
TextBox2.DataBindings.Add("text", ds, "FLIGHT_NO")
TextBox3.DataBindings.Add("text", ds, "DEPATURE")
TextBox4.DataBindings.Add("text", ds, "DEPATURE_TIME")
TextBox5.DataBindings.Add("text", ds, "ARRIVAL")
TextBox6.DataBindings.Add("text", ds, "ARIVAL_TIME")
TextBox7.DataBindings.Add("text", ds, "AIRCRAFT")
TextBox8.DataBindings.Add("text", ds, "VIA")
TextBox9.DataBindings.Add("text", ds, "FREQUENCT")
CheckBox1.DataBindings.Add("text", ds, "TRANSIST")
EndSub

Thank you!!!
HB.:(
 
VB.NET:
        Dim constring As String = "....."
     
        Dim conn As OleDbConnection = New OleDbConnection(constring)
        conn.Open()

        Dim comm As OleDbCommand = New OleDbCommand("SELECT * FROM student", conn)

        Dim da As OleDbDataAdapter = New OleDbDataAdapter()

        da.SelectCommand = comm

        Dim ds As New DataSet()
        da.Fill(ds, "student")

        TextBox1.DataBindings.Add("text", ds.Tables(0), "rno")
 
I know this could sound absolutely ridiculous but it could be because you have spelled it wrong....

This is yours... (Micosoft)

"provider=micosoft.jet.oledb.4.0; data source=E:\WindowsApplication2

It should be...(Microsoft)
 
Back
Top