Hi,
I have the following:
Sub Select_Click(sender As Object, e As EventArgs)
Panel1.Visible = False
Dim myDataGridItem As DataGridItem
Dim chkSelected As System.Web.UI.WebControls.CheckBox
Dim strMCICardID As String
For Each myDataGridItem In searchresults.Items
chkSelected = myDataGridItem.FindControl("chkSelection")
If chkSelected.Checked Then
strMCICardID = CType(myDataGridItem.FindControl
("lblMCICardID"), Label).Text
Panel2.Visible = True
End Sub
Sub Submit_Click(sender As Object, e As EventArgs)
If Page.IsValid then
Dim objConn As SqlConnection
Dim objSQLCommand As SqlCommand
Dim objParam As SqlParameter
Dim boolInsertOK As Boolean = False
Dim intReturnError as Integer
'Set up our connection object and SQL command
object.
objConn = New SqlConnection("_")
objSQLCommand = New SqlCommand("spLostCard",
objConn)
'Set the stored procedure.
objSQLCommand.CommandType =
CommandType.StoredProcedure
'Add input parameters...
objParam = objSQLCommand.Parameters.Add
("@CustomerUID", strMCICardID)
'Add our ouput parameters...
objParam = objSQLCommand.Parameters.Add
("@Error_Code", SqlDbType.Int)
objParam.Direction = ParameterDirection.Output
'Open the db connection & Execute Command.
objConn.Open()
objSQLCommand.ExecuteNonQuery()
'Get the return values.
If Not IsDBNull(objSQLCommand.Parameters
("@Error_Code").Value) Then
intReturnError = (objSQLCommand.Parameters
("@Error_Code").Value)
End If
Response.Write ("<BR>return error code = " &
intReturnError)
'Check the error.
If intReturnError = 0 Then
'No errors. Set our confirm msg.
boolInsertOK = True
Else
'We had an error. Set our error msg.
boolInsertOK = False
End If
'Close the DB connection.
objConn.Close()
End If
End Sub
However, I am getting this error: Procedure 'spLostCard' expects
parameter '@CustomerUID', which was not supplied
Thanks!
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/