did you mean
getting a cell value from excell to through vb?
if so here it is
Private Sub LoadCont(ByVal sPathFile As String)
Dim oExcelApp As Microsoft.Office.Interop.Excel.Application
Dim oWorkBook As Microsoft.Office.Interop.Excel.Workbook
Dim oWorkSheet As...
heres a sample code i use
Private WithEvents oPrintDoc As New System.Drawing.printing.PrintDocument
Private hRecPrinted As Short
Private Sub oPrintDoc_BeginPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles oPrintDoc.BeginPrint
hRecPrinted = 0
End...
i think
its because you are accessing the wrong data
dr.read - reads the topmost row
the row you've just saved
might be located down below.
you can include where in your command sql
1. to retrieve data only use datareader
to save use dataset
for datareader
Dim oleDrd As OleDbDataReader
Dim oleCmd As New OleDbCommand
oleCmd.CommandText = sql
oleDrd = .ExecuteReader
oledrd.read
variable = .item(fieldname)
for dataset
you still need a datarow
Dim oleDrw As DataRow...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.