Example : How to Concatenate/add multiple fields of same table as one.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
(Write complete database connectivity code here first)
Dim a, b, c As String
cn.Open()
cm.CommandText = "select * from userreg where name='" + CmbPName.Text + "'"
rdr = cm.ExecuteReader
While (rdr.Read())
TxtAlias.Text = (rdr("alias").ToString)
a = (rdr("adr").ToString)
b = (rdr("dist").ToString)
c = (rdr("state").ToString)
TxtAddr.Text = a + "," + b + "," + c
End While
cn.Close()
End Sub
0 Comments