Quantcast
Channel: DataSource Controls - SqlDataSource, ObjectDataSource, etc.
Viewing all articles
Browse latest Browse all 956

How getting a textbox by row

$
0
0

Hi all, 

I have following code:

  Dim con As New SqlConnection
            Dim cmd As New SqlCommand("paises_GET", con)
            Try
                con.ConnectionString = "Data Source=192.168.250.28;Initial Catalog=Uned;Persist Security Info=True;User ID=josmanext;Password=123456"
                con.Open()
                cmd.Connection = con
                cmd.CommandType = CommandType.StoredProcedure
                cmd.Parameters.Add("@continente", SqlDbType.NVarChar, 80).Value = vContinente
                cmd.ExecuteNonQuery()
                Dim dr = cmd.ExecuteReader

                While dr.Read()
                    Pais1.Text = dr(0).ToString

                End While

this query returns four random records

I have a Panel with four textboxes, how can I get a field from each record in a textbox?

thanks for help!!!


Viewing all articles
Browse latest Browse all 956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>