can read from DB source, y?

i have following, but i can't read from my DB source, y?
some 1 please check 4 me, k?

Public Class Form1
Dim conn As New System.Data.OleDb.OleDbConnection()
Dim datAdp As New System.Data.OleDb.OleDbDataAdapter()
Dim datSet As DataSet
Dim connection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = 'mySal.mdb'"
conn.ConnectionString = connection
' Insert code to process data.
datAdp = New System.Data.OleDb.OleDbDataAdapter("SELECT * FROM tblSal", conn)
datAdp.InsertCommand.Parameters.Add("@Leave", System.Data.OleDb.OleDbType.Numeric, 10, "Leave")
datAdp.InsertCommand.Parameters.Add("@OT", System.Data.OleDb.OleDbType.Numeric, 10, "OT")
datAdp.InsertCommand.Parameters.Add("@Expenses", System.Data.OleDb.OleDbType.Numeric, 10, "Expenses")
datSet = New DataSet("MS_Access_DataSet")
datAdp.Fill(datSet, "MS_Access_DataSet")

' Bind DataGrid control to this dataset
datInfo.SetDataBinding(datSet, "MS_Access_DataSet")
Catch ex As Exception
MessageBox.Show("Failed to connect to data source")
End Try

thanks a lot...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!