Hi,
I am in the web.
The code is:
Protected WithEvents dgrdTitles As
System.Web.UI.WebControls.DataGrid
Dim sqlConnectionString As String =
System.Configuration.ConfigurationSettings.AppSettings
("ConnectionString")
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim conObj As SqlConnection
Dim cmdSelect As SqlCommand
Dim dtrAlerts As SqlDataReader
' Retrieve records from database
conObj = New SqlConnection(sqlConnectionString)
conObj.Open()
cmdSelect = New SqlCommand("spSelectDetails",
conObj)
cmdSelect.CommandType = CommandType.StoredProcedure
dtrAlerts = cmdSelect.ExecuteReader()
dgrdTitles.DataSource = dtrAlerts
dgrdTitles.DataBind()
dtrAlerts.Close()
conObj.Close()
End Sub
Should I make endless loop and call DataBind ?
Thank you.