You need something like this:
Dim ConnectionString As String = String.Empty, sCommand As String = String.Empty
Dim rCnt As Integer = 0, Empno As Integer = 0, Otvalue As Integer = 0, retVal As Integer = 0
Dim xlApp As Excel.Application = Nothing, xlWorkBook As Excel.Workbook = Nothing, xlWorkSheet As Excel.Worksheet = Nothing, xlRange As Excel.Range = Nothing
Dim dBaseConnection As OleDb.OleDbConnection = Nothing, dBaseCommand As OleDb.OleDbCommand = Nothing
Try
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & IO.Path.GetDirectoryName(File_dbf) & ";Extended Properties=dBase IV"
dBaseConnection = New OleDb.OleDbConnection(ConnectionString)
dBaseConnection.Open()
xlApp = New Excel.Application
xlWorkBook = xlApp.Workbooks.Open(File_Name)
xlWorkSheet = xlWorkBook.Worksheets("sheet1")
xlRange = xlWorkSheet.UsedRange
For rCnt = 1 To xlRange.Rows.Count
Empno = xlRange.Cells(rCnt, 1).Value2
Otvalue = xlRange.Cells(rCnt, 3).Value2
sCommand = "UPDATE paytran.DBF SET OT1 = " & Otvalue.ToString & " WHERE EMPNO = " & Empno.ToString
dBaseCommand = New OleDb.OleDbCommand(sCommand, dBaseConnection)
retVal = dBaseCommand.ExecuteNonQuery()
Next
xlWorkBook.Close()
xlApp.Quit()
dBaseConnection.Close()
Catch ex As System.InvalidCastException
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error...")
Catch ex As OleDb.OleDbException
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error...")
Catch ex As System.NullReferenceException
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error...")
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error...")
Finally
releaseObject(xlApp)
releaseObject(xlWorkBook)
releaseObject(xlWorkSheet)
End Try