dukeofawesome
Member
Hi,
I am having an issue where for some reason the following code only returns the ID but no other fields. Can someone see where the problem lies?
Many thanks...
I am having an issue where for some reason the following code only returns the ID but no other fields. Can someone see where the problem lies?
VB.NET:
Dim lstVal As String = lstUSerID.SelectedValue.ToString
Dim sstrSQL As String
Dim cls As New clsGlobals
sstrSQL = "SELECT * FROM tblUsers WHERE ID=" & NZ(lstVal, 0)
dbs.ConnectDB()
ds = dbs.sqlSelect(sstrSQL)
If ds.Tables("Results").Rows.Count > 0 Then
With ds.Tables("Results").Rows(0)
txtID.Text = .Item("ID").ToString
txtUsername.Text = .Item("Username").ToString
txtFirstName.Text = .Item("UserFirstName").ToString
txtLastName.Text = .Item("UserLastName").ToString
txtAddressLine1.Text = .Item("UserAddress1").ToString
txtAddressLine2.Text = .Item("UserAddress2").ToString
txtCity.Text = .Item("UserCity").ToString
txtState.Text = .Item("UserState").ToString
txtPostcode.Text = .Item("UserPostcode").ToString
txtPhone.Text = .Item("UserPhone").ToString
txtMobile.Text = .Item("UserMobile").ToString
txtEmail.Text = .Item("UserEmail").ToString
End With
End If
dbs.CloseDB()
Many thanks...