Public Sub HowToPassParameters() ' Create the parameter and set the direction Dim param1 As IDbDataParameter = Me.CreateParameter("@result", 0) param1.Direction = ParameterDirection.Output ' Call the stored procedure and pass the parameter Dim cmd As IDbCommand Me.ExecSprocScalar("OutputParamTest", cmd, param1) ' Retrieve the value from the command object Dim param As IDbDataParameter = CType(cmd.Parameters("@result"), IDbDataParameter) Dim x As Integer = CInt(param.Value) End Subthe 'cmd' is underlined and I get this error: