how can we display data from SQL server table into web form(textbox)?
how to get data from SQL server 2005?
Collapse
X
-
Originally posted by waterfallhow can we display data from SQL server table into web form(textbox)?
Code:Dim sqlCon As SqlConnection sqlCon = New SqlConnection(sqlConnectionString) ' Creat the command against SQL database(retrieving the value u want) Dim sqlCommand As New SqlCommand("select [column] from [table] where [column] = [value u want]", sqlCon) ' Open the COnnection sqlCon.Open() ' set ur textbox value to the value returned by the command TextBox8.Text = sqlCommand.ExecuteScalar() sqlCon.close()Comment
Comment