If IsNothing(command.Parameters("@UserId")) thrown an exception why?  
Author Message
jnstaub





PostPosted: Visual Basic Express Edition, If IsNothing(command.Parameters("@UserId")) thrown an exception why? Top

is not contained by this SqlParameterCollection."} System.Exception




Visual Studio Express Editions24  
 
 
nobugz





PostPosted: Visual Basic Express Edition, If IsNothing(command.Parameters("@UserId")) thrown an exception why? Top

Avoid this exception by using SqlParameterCollection.Contains().


 
 
DMan1





PostPosted: Visual Basic Express Edition, If IsNothing(command.Parameters("@UserId")) thrown an exception why? Top

nobugz solution will let you know if the parameter has been added to the collection and then you can test the "value" of the parameter to see if it contains a legitimate value...