>>>OleDbCommand oCommand = new OleDbCommand(); >>>// connectionString is valid string (not shown here) >>>OleDbConnection oConnection = new OleDbConnection(connectionString); >>>oConnection.Open(); >>>oCommand.CommandText = "SP_MyProc"; >>>oCommand.CommandType = CommandType.StoredProcedure; >>>oCommand.Parameters.AddWithValue( "@par1", cPar1 ); >>>>>>
>>>IDbCommand oCommand; >>>idbCommand = new OleDbCommand(); >>>// connectionString is valid string (not shown here) >>>OleDbConnection oConnection = new OleDbConnection(connectionString); >>>oConnection.Open(); >>>oCommand.CommandText = "SP_MyProc"; >>>oCommand.CommandType = CommandType.StoredProcedure; >>>oCommand.Parameters.AddWithValue( "@par1", cPar1 ); >>>>>>
>>>'System.Data.IDataParameterCollection' does not contain definition for 'AddWithValue' >>>>>>
IDbCommand idbCommand = new OleDbCommand(); > IDbDataParameter param = idbCommand.CreateParameter(); > param.ParameterName = "@par1"; > param.Value = cPar1; > idbCommand.Parameters.Add(param);Thank you very much.