So here i am trying to get an exact phrase from a Compact database based on a text label which only has part of the name of the value stored in the database. I guess i need some way to compare or search the database for a matching value to the text label. But i am not sure how to do it properly. The address location is a program .exe i need to launch.
My head is fried from all the coding today and i know this is probably simple but i cant think straight atm, and i honestly dont know a great deal about databases and readers just yet, to get it working. so i appreciate if anyone can help string this together with me or point me to a class to do this. Does this make sense? if not i can try explain in more detail.
Code:
NameLabel.Text ' this text contains part of the name i need to find in the database.
Using reader As SqlCeDataReader = cmd.ExecuteReader
While (reader.Read())
Dim AddressLocation As String = ""
Process.Start(AddressLocation.IndexOf(reader. 'This is where i am stuck, as I don't know the exact method to get the a matching result from a label called: NameLabel.Text and return the database result to a string called AddressLocation
MsgBox(AddressLocation)
End While
End Using