I am creating a stored procedure that returns the numbers of records found based on the number of parameters the user inputs into the form.
there are 9 boxes they can fill in(at least 1, up to 9)
I got the stored procedure working, but now I am trying to add the parameters into the Ok Button. When I run it though I'm not getting any return number... Can anyone help?? THANKS
Any help would be appreciated...
there are 9 boxes they can fill in(at least 1, up to 9)
I got the stored procedure working, but now I am trying to add the parameters into the Ok Button. When I run it though I'm not getting any return number... Can anyone help?? THANKS
Code:
Private Sub BtnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOk.Click
Dim cliId, AcctNum, Last, First As String
cliId = Me.txtCliId.Text
AcctNum = Me.txtAcctNum.Text
Last = Me.txtCLName.Text
First = Me.TxtCFName.Text
Da.SelectCommand.Parameters("@CliId").Value = cliId
Da.SelectCommand.Parameters("@AcctNum").Value = DBNull.Value
Da.SelectCommand.Parameters("@CLName").Value = DBNull.Value
Da.SelectCommand.Parameters("@CFName").Value = DBNull.Value
Da.SelectCommand.Parameters("@Custodian").Value = DBNull.Value
Da.SelectCommand.Parameters("@MMGr").Value = DBNull.Value
Da.SelectCommand.Parameters("@Advisor").Value = DBNull.Value
Da.SelectCommand.Parameters("@PA").Value = DBNull.Value
Da.SelectCommand.Parameters("@Status").Value = DBNull.Value
Da.SelectCommand.Parameters("@Rc").Value = DBNull.Value
SqlConn.Open()
Da.SelectCommand.ExecuteNonQuery()
SqlConn.Close()
Dim Rc As Integer
Da.SelectCommand.Parameters("@Rc").Value = Rc
If Rc < 1 Then
Response.Redirect("NoClientPage.aspx")
ElseIf Rc = 1 Then
Response.Redirect("Broadcast.aspx")
Else
Response.Redirect("AcctsMany.aspx")
End If
End Sub
Any help would be appreciated...