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 Dim test 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 …

Member Avatar
Member Avatar
+0 forum 1

I am trying to select data from a database in the based on a condition....Its just a simple select SQL query [CODE]SELECT playerid FROM player WHERE username = 'John'[/CODE] 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 Dim test sql2 = "SELECT playerid FROM player WHERE username = 'John'" test= New OleDb.OleDbDataAdapter(sql2, myCon) test = da.GetFillParameters() 'AddData("Player1ID, Player2ID", "'" & tbxPlayerID.Text & "', '" & test & '")[/CODE] What would be the best …

Member Avatar
Member Avatar
+0 forum 1

The End.