Dim conn As New OleDb.OleDbConnection
Dim dbprovider As String
Dim dbsource As String
Dim ds As New DataSet
Dim da As New OleDb.OleDbDataAdapter
Dim sql As String
Dim maxrows As Integer
dbprovider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbsource = "Data Source = d:\sprrg\scm\scm\sprrg.mdb"
conn.ConnectionString = dbprovider & dbsource
conn.Open()
sql = "select max(mrn_no) from mr_head"
da = New OleDb.OleDbDataAdapter(sql, conn)
da.Fill(ds, "mr_head")
maxrows = ds.Tables("mr_head").Rows.Count
I want to find out the max number from one table and when i execute this query i am getting the error as No value given for one or more required parameters.
Kindly help me...