jennyek2000
Programmer
I want to retreive the value of the primary key of the last row in a dataset. I have used the following code so far,
Dim mydataset As New DataSet()
myDataAdapter = New OleDbDataAdapter("SELECT * FROM transmittals", myConnection)
myDataAdapter.Fill(mydataset, "transmittals"
Dim bmtransmittals As BindingManagerBase
bmtransmittals = Me.BindingContext(mydataset, "Transmittals"
bmtransmittals.Position = bmtransmittals.Count - 1
Hopefully this code has got me to the last row in the dataset? But now how do I retreive the value of the primary
key (transNo) so that I can display it in a text box?
Thanks,
Jenny
Dim mydataset As New DataSet()
myDataAdapter = New OleDbDataAdapter("SELECT * FROM transmittals", myConnection)
myDataAdapter.Fill(mydataset, "transmittals"
Dim bmtransmittals As BindingManagerBase
bmtransmittals = Me.BindingContext(mydataset, "Transmittals"
bmtransmittals.Position = bmtransmittals.Count - 1
Hopefully this code has got me to the last row in the dataset? But now how do I retreive the value of the primary
key (transNo) so that I can display it in a text box?
Thanks,
Jenny