How to Connect to Access using Sharpdevelop

Sharpdevelop is a free programming that uses Basic language similar to VB.NET. This tutorial will show you how to connect to Microsoft Access from SharpDevelop. Here is my screenshot when the program is executed, showing the connection status. This tutorial also applied to Vistual Basic.NET.

tmpF922

Here is my code:

Sub BtnshowtableClick(sender As Object, e As EventArgs)
Dim koneksi As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection()
        koneksi.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\\drilling_fe.mdb"  ‘change the directory match with your access database
        koneksi.Open  ‘open the connection
        MsgBox ("Status Koneksi" & " :" & koneksi.State.ToString, MsgBoxStyle.Information,"Status")  ‘connection status will be displayed here
        koneksi.Close  ‘ close the connection
End Sub