I am trying to select data from a database in the based on a condition....Its just a simple select SQL query
[QUOTE]SELECT playerid FROM player WHERE username = 'John'[/QUOTE]
Therefore, from this I would like to store John's playerid to a variable and then use this variable.
Below is my attempt but not getting anywhere:
[CODE]Dim da As OleDb.OleDbDataAdapter
Dim sql2 As String
sql2 = "SELECT playerid FROM player WHERE username = 'John'"
test= New OleDb.OleDbDataAdapter(sql2, myCon) 'AddData("Player1ID, Player2ID", "'" & tbxPlayerID.Text & "', '" & test & '")[/CODE]
What would be the best way to achieve what I'm trying to do? maybe there is a much simple method.
im an new to this so, any help would be much appreciated. i am using Microsoft Visual Basic 2008 Express Edition....