S
sck10
Hello,
I am calling a stored procedure to populate a Repeater Control. What I need
to do is see if a name is in the list and if not, add it to the Repeater.
Is there a way to reset the OleDbDataReader back to the beginning after I
bind it to the Repeater control and then use "If spApproverList.HasRows" to
loop through the reader?
Thanks, sck10
'Open connection to database
Dim cnnSearch As OleDb.OleDbConnection = New
OleDb.OleDbConnection(strConnBsomApps)
cnnSearch.Open()
Dim spApproverList As OleDb.OleDbDataReader
Dim prmApproverList As OleDbParameter
Dim cmdApproverList As New OleDb.OleDbCommand(str00, cnnSearch)
cmdApproverList.CommandType = CommandType.StoredProcedure
'Declare Parameters
prmApproverList = cmdApproverList.Parameters.Add("@strParm01",
OleDbType.VarChar) : prmApproverList.Value = str01
'Data Bind: DropdownList
spApproverList = cmdApproverList.ExecuteReader()
ddlApproverList.DataSource = spApproverList
ddlApproverList.DataTextField = "Handle"
ddlApproverList.DataBind()
'ddlApproverList.Items.FindByValue(Me.hdnWebUser.Value).Selected = True
Dim strHandleText As String = ""
If spApproverList.HasRows Then
Do While spApproverList.Read
If Not IsDBNull(spApproverList("Handle")) Then strHandleText =
CType(spApproverList("Handle"), String)
Loop
End If
I am calling a stored procedure to populate a Repeater Control. What I need
to do is see if a name is in the list and if not, add it to the Repeater.
Is there a way to reset the OleDbDataReader back to the beginning after I
bind it to the Repeater control and then use "If spApproverList.HasRows" to
loop through the reader?
Thanks, sck10
'Open connection to database
Dim cnnSearch As OleDb.OleDbConnection = New
OleDb.OleDbConnection(strConnBsomApps)
cnnSearch.Open()
Dim spApproverList As OleDb.OleDbDataReader
Dim prmApproverList As OleDbParameter
Dim cmdApproverList As New OleDb.OleDbCommand(str00, cnnSearch)
cmdApproverList.CommandType = CommandType.StoredProcedure
'Declare Parameters
prmApproverList = cmdApproverList.Parameters.Add("@strParm01",
OleDbType.VarChar) : prmApproverList.Value = str01
'Data Bind: DropdownList
spApproverList = cmdApproverList.ExecuteReader()
ddlApproverList.DataSource = spApproverList
ddlApproverList.DataTextField = "Handle"
ddlApproverList.DataBind()
'ddlApproverList.Items.FindByValue(Me.hdnWebUser.Value).Selected = True
Dim strHandleText As String = ""
If spApproverList.HasRows Then
Do While spApproverList.Read
If Not IsDBNull(spApproverList("Handle")) Then strHandleText =
CType(spApproverList("Handle"), String)
Loop
End If