lyric0n
Technical User
- Dec 28, 2005
- 74
Hello,
I have a stored procedure which takes 3 variables in, modifies one of the variables, which is a bit, then returns it. How would I capture this response with Visual Basic 2005? I have written below what I have tried...
Thanks,
Chris
objProcessCommand.Parameters.Add("@Valid", SqlDbType.Bit, ParameterDirection.ReturnValue)
objProcessCommand.Parameters.Add("@IPAddr", SqlDbType.VarChar, ParameterDirection.Input).Value = strIPAddr
objProcessCommand.Parameters.Add("@MACAddr", SqlDbType.VarChar, ParameterDirection.Input).Value = strMACAddr
objProcessCommand.ExecuteNonQuery()
If objProcessCommand.Parameters(0).Value Then
Console.WriteLine("True")
Else
Console.WriteLine("False")
End If
I have a stored procedure which takes 3 variables in, modifies one of the variables, which is a bit, then returns it. How would I capture this response with Visual Basic 2005? I have written below what I have tried...
Thanks,
Chris
objProcessCommand.Parameters.Add("@Valid", SqlDbType.Bit, ParameterDirection.ReturnValue)
objProcessCommand.Parameters.Add("@IPAddr", SqlDbType.VarChar, ParameterDirection.Input).Value = strIPAddr
objProcessCommand.Parameters.Add("@MACAddr", SqlDbType.VarChar, ParameterDirection.Input).Value = strMACAddr
objProcessCommand.ExecuteNonQuery()
If objProcessCommand.Parameters(0).Value Then
Console.WriteLine("True")
Else
Console.WriteLine("False")
End If