thirteentwenty
Well-known member
OK, I've officially lost it...
I'm trying to get a database entry (access) and compare it with a value in a textbox... but i cant seem to get the database entry out... I mean I can, but I cant seem to get to be variable...
This is what I've got...
What I need to do is find out if frm_main.txt_ID is the same as LastNo, if it is, move on to do something else, and if not do something else...
My first thought is to get LastNo and say something like
Thanks for the assist...
and on another completely different note, is it proper to give a rep-point or something for the aide? and how does one mark the thread as "Answered"?
I'm trying to get a database entry (access) and compare it with a value in a textbox... but i cant seem to get the database entry out... I mean I can, but I cant seem to get to be variable...
This is what I've got...
VB.NET:
Public Function Test()
com = New OleDb.OleDbCommand("SELECT * FROM Prefs", con)
da = New OleDb.OleDbDataAdapter
da.SelectCommand = com
dt = New DataTable
da.Fill(dt)
frm_main.txt_ID.DataBindings.Add("Text", dt, "LastNo")
da.Dispose()
da = Nothing
com.Dispose()
com = Nothing
frm_main.txt_ID.DataBindings.Clear()
Return ""
End Function
What I need to do is find out if frm_main.txt_ID is the same as LastNo, if it is, move on to do something else, and if not do something else...
My first thought is to get LastNo and say something like
VB.NET:
If LastNo = frm_main.txt_ID.Text Then
'do something
Else
'do something else
End If
Thanks for the assist...
and on another completely different note, is it proper to give a rep-point or something for the aide? and how does one mark the thread as "Answered"?
Last edited: