I am trying to use a VB generated textbox to display the values/names, that are within an SQL database. I started with VB and SQL last week; I tried to use a self-built method named GetUserInfo() to display the values, but it doesnt display anything.
This is the segment used for the Textbox in VB
Public Class user_selection_screen
Private SQL As SQLControl
Private Authuser As String
Private Sub ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles box_user_selection.SelectedIndexChanged
GetUserInfo()
End Sub
Public Sub GetUserInfo()
SQL.RunQuery("SELECT Name" & "FROM" ""User"")
For Each i As Object In SQL.SQLDS.Tables(0).Rows
box_user_selection.Text = i.Item("Name" & vbCrLf)
Next
End Sub
I started learning VB and SQL last week, so please keep the explanations as simple as possible.
User?