Inconsistent Accessibilty: parameter type 'CRUDApplication.Models.IEmployeeRepository' is less accessable than method 'CRUDApplication.Controllers.EmployeeController.EmployeeController'

Am getting this error in my code
Inconsistent accessibility: parameter type 'CRUDApplication.Models.IEmployeeRepository' is less accessible than method 'CRUDApplication.Controllers.EmployeeController.EmployeeController(CRUDApplication.Models.IEmployeeRepository)'   
Here's my code
// EmployeeController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CRUDApplication.Models;
using System.Data;
namespace CRUDApplication.Controllers
    public class EmployeeController : Controller
        // GET: /Employee/
         private IEmployeeRepository _repository;
        public EmployeeController()
            : this(new EmployeeRepository())
        public EmployeeController(IEmployeeRepository repository)
            _repository = repository;
        public ActionResult Index()
            var employee = _repository.GetEmployee();
            return View(employee);
        public ActionResult Details(int id)
            EmployeeModel model = _repository.GetEmployeeByID(id);
            return View(model);
        public ActionResult Create()
            return View(new EmployeeModel());
        [HttpPost]
        public ActionResult Create(EmployeeModel employee)
            try
                if (ModelState.IsValid)
                    _repository.InsertEmployee(employee);
                    return RedirectToAction("Index");
            catch (DataException)
                ModelState.AddModelError("", "Can't be Saved!");
            return View(employee);
        public ActionResult Edit(int id)
            EmployeeModel model = _repository.GetEmployeeByID(id);
            return View(model);
        [HttpPost]
        public ActionResult Edit(EmployeeModel employee)
            try
                if (ModelState.IsValid)
                    _repository.UpdateEmployee(employee);
                    return RedirectToAction("Index");
            catch (DataException)
                ModelState.AddModelError("", "Can't be Saved!");
            return View(employee);
        public ActionResult Delete(int id, bool? saveChangesError)
            if (saveChangesError.GetValueOrDefault())
                ViewBag.ErrorMessage = "Can't be Deleted!";
            EmployeeModel employee = _repository.GetEmployeeByID(id);
            return View(employee);
        [HttpPost, ActionName("Delete")]
        public ActionResult DeleteConfirmed(int id)
            try
                EmployeeModel user = _repository.GetEmployeeByID(id);
                _repository.DeleteEmployee(id);
            catch (DataException)
                return RedirectToAction("Delete",
                new System.Web.Routing.RouteValueDictionary {
          { "id", id },
          { "saveChangesError", true } });
            return RedirectToAction("Index");
// IEmployeeRepository.cs
namespace CRUDApplication.Models
      interface IEmployeeRepository
        IEnumerable<EmployeeModel> GetEmployee();
        EmployeeModel GetEmployeeByID(int Emp_ID);
        void InsertEmployee(EmployeeModel emp_Model);
        void DeleteEmployee(int Emp_ID);
        void UpdateEmployee(EmployeeModel emp_Model);
// EmployeeRepository.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace CRUDApplication.Models
    public class EmployeeRepository : IEmployeeRepository
        private EmployeeDataContext emp_DataContext;
        public EmployeeRepository()
            emp_DataContext = new EmployeeDataContext();
        public IEnumerable<EmployeeModel> GetEmployee()
            IList<EmployeeModel> employeeList = new List<EmployeeModel>();
            var myQuery = from q in emp_DataContext.EmployeeTabs
                          select q;
            var emp = myQuery.ToList();
            foreach (var empData in emp)
                employeeList.Add(new EmployeeModel()
                    ID = empData.ID,
                    Emp_ID = empData.Emp_ID,
                    Name = empData.Name,
                    Dept = empData.Dept,
                    City = empData.City,
                    State = empData.State,
                    Country = empData.Country,
                    Mobile = empData.Mobile
            return employeeList;
        public void InsertEmployee(EmployeeModel emp_Model)
            var empData = new EmployeeTab()
                Emp_ID = emp_Model.Emp_ID,
                Name = emp_Model.Name,
                Dept = emp_Model.Dept,
                City = emp_Model.City,
                State = emp_Model.State,
                Country = emp_Model.Country,
                Mobile = emp_Model.Mobile
            emp_DataContext.EmployeeTabs.InsertOnSubmit(empData);
            emp_DataContext.SubmitChanges();
        public void DeleteEmployee(int Emp_ID)
            EmployeeTab employee = emp_DataContext.EmployeeTabs.Where(u => u.ID == Emp_ID).SingleOrDefault();
            emp_DataContext.EmployeeTabs.DeleteOnSubmit(employee);
            emp_DataContext.SubmitChanges();
        public void UpdateEmployee(EmployeeModel emp_Model)
            EmployeeTab EmpData = emp_DataContext.EmployeeTabs.Where(u => u.ID == emp_Model.ID).SingleOrDefault();
            EmpData.Name = emp_Model.Name;
            EmpData.Dept = emp_Model.Dept;
            EmpData.City = emp_Model.City;
            EmpData.State = emp_Model.State;
            EmpData.Country = emp_Model.Country;
            EmpData.Mobile = emp_Model.Mobile;
            emp_DataContext.SubmitChanges();

You have a ctor on EmployeeController that is public and therefore callable by anyone.  However it accepts an IEmployeeRepository which is not a public type. Therefore it will not compile. You can fix this one of several ways:
Make IEmployeeRepository public
IEmployeeRepository is most likely marked as internal so mark the EmployeeController ctor as internal as well.  Chances are this was done for unit testing so if you mark it internal then your unit test project won't find it anymore.  To work around
that add
InternalsVisibleTo attribute to your repository assembly as well.  The parameter will be the name of your unit test project.  This allows the unit test project to find the internal ctor.
Michael Taylor
http://blogs.msmvps.com/p3net

Similar Messages

  • Inconsistent input parameter (Parameter: i_sid, value 0)

    Hi BI experts,
    I have a question. When I load my data from a DSO to a infocube it loads succesvol. But when i try to look at the data in the infocube I get the error "Inconsistent input parameter (Parameter: i_sid, value 0). Does someone know the solution to this problem.
    Thanks in advance.
    Regards,
    Ricky

    Hi Folks,
    in case somebody else come accross this problem.
    this simple code solved the problem.
    REPORT  Z_TEST.
    data wa_/BI0/SREQUID type /BI0/SREQUID.
    wa_/BI0/SREQUID-requid = 0.
    wa_/BI0/SREQUID-sid = 0.
    INSERT INTO /BI0/SREQUID VALUES wa_/BI0/SREQUID.
    Rg. Jimbob

  • Error while trying to choose query parameter Inconsistent input paramete

    I got error on PRD while trying to choose parameter before executing BEX query:
    101 Inconsistent input parameter (parameter: <unknown>, value <unknown>)
    100 Program error in class SAPMSYY1 method: UNCAUGHT_EXCEPTION
    Notes:
    the same functionality works fine in DEV environment.
    the other parameters on query in PRD work fine
    the parameter  with error based on custom hierarchy
    P.S. I heart BEx :]

    Hello,
    This problem has been solved before with notes 1236774, 1151320 & 1264213.
    Please check.
    Thanks,
    Michael

  • Question on the parameter type of DLL functions

    Question on the parameter type of DLL functions
    I am trying to develop an interface to control a laser with LV8.2  I am planing to use the VI “Call Library Function Node” to call the DLL and set the exact same parameters of functions in the DLL.
    According to the DLL manual of the laser, there are six functions.  One of the prototypes is:  function getstatuspointer : pointer. I don't know how to set this parameter for the function. Is there anyone who can give some hints? Thanks!
    BTW :The following is a description of the function:
    This function returns a 32 bit pointer to the STATUS data structure (Tstatusrec). In the 32 bit DLL, every application is using its own copy of the data structure (local
    memory). The data structure is a packed structure. "packed" means that the fields in the structure are not aligned on word or double-word boundaries.
    Tstatusrec = packed record
                            size : word;
                            initstat : byte;
                            queuefill : byte;
                            anzapp16 : word; (not used)
                            anzapp32 : word;
                            anzdock16 : word; (not used)
                            anzdock32 : word;
                            dll16ver : tchararray; (not used)
                            dll32ver : tchararray;
                            excimerver : tchararray;
                            excimer : TExcimerStatus;
                      end;

    Hi Jack,
    This is a good starting point when using Call Library Function node. Check out this Help Page
    Van L
    NI Applications Engineer

  • What are right parameter types of ODCIIndexInsert in case of creating indextype WITH ARRAY DML option (documentation mismatch)

    Hello.
    During developing Domain Index for Oracle 11.2.0.1.0 (problem also appears in 12с) i was faced with misunderstanding of parameter types of function
    ODCIIndexInsert in case of creating indextype  WITH ARRAY DML option
    According to Oracle documentation
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10765/ext_idx_ref.htm#i76892
    In case of  WITH ARRAY DML option Oracle will invoke ODCIIndexInsert with following signature
    FUNCTION ODCIIndexInsert(
      ia ODCIIndexInfo,
      ridlist ODCIRidList,
      newvallist varray_of_column_type,
      env ODCIEnv)
    RETURN NUMBER
    In my case indexed column has datatype NUMBER so i defined varray_of_column_type as SYS.ODCINumberList
    STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList,  newvallist in sys.ODCINumberList, env in SYS.ODCIEnv) RETURN NUMBER
    Indextype was created as
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML(number, sys.ODCINumberList)
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    or
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    (problem occurs in all cases)
    CREATE TABLE test_table (id NUMBER (19,0));
    CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type;
    When attempting to insert data in the table
    insert into test_table values (1);
    oracle raise exception
    Error starting at line 53 in command:
    insert into test_table values (1)
    Error at Command Line:53 Column:1
    Error report:
    SQL Error: ORA-29925: cannot execute SCOTT.INDEX_METHODS.ODCIINDEXINSERT
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'ODCIINDEXINSERT'
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'ODCIINDEXINSERT'
    29925. 00000 -  "cannot execute %s"
    *Cause:    The specified function does not exist or does not have an
               appropriate signature.
    *Action:   Implement the function with the appropriate signature.
    So my question is.
    Is it normal behavior  of oracle (according to documentation)?
    What is correct signature of ODCIIndexInsert function in case of INDEXTYPE creation with 'WITH ARRAY DML' option and fact that indexed column has NUMBER datatype?
    By the way if i define indextype without 'WITH ARRAY DML' option signature is clear, and working. But this approach doesn't satisfies our performance needs.
    Also if i define index type with option 'WITH ARRAY DML WITHOUT COLUMN DATA' and use signature
    static function ODCIIndexInsert(ia sys.odciindexinfo,   ridlist sys.odciridlist, env sys.ODCIEnv) return number
    Everything works too. But this approach doesn't satisfies our business needs.
    Is it a way to define ODCIIndexInsert  parameter types (in case of indexing number column)  so that batch inserting works according to documentation ?
    FUNCTION ODCIIndexInsert(
          ia ODCIIndexInfo,
          ridlist ODCIRidList,
          newvallist varray_of_column_type,
          env ODCIEnv)
    I am attaching full sql script to recreate environment and reproduce the problem.
    Type definition:
    CREATE OR REPLACE TYPE index_methods AS OBJECT
      step number,
      STATIC FUNCTION ODCIGetInterfaces(ifclist OUT SYS.ODCIObjectList) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexCreate (ia SYS.ODCIIndexInfo, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexAlter (ia sys.ODCIIndexInfo, parms IN OUT VARCHAR2, altopt number, env sys.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexDrop(ia SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexExchangePartition(ia SYS.ODCIIndexInfo, ia1 SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexUpdPartMetadata(ia sys.ODCIIndexInfo, palist sys.ODCIPartInfoList, env sys.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList,  newvallist in sys.ODCINumberList, env in SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexDelete(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexUpdate(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, newval number, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexStart(sctx IN OUT index_methods, ia SYS.ODCIIndexInfo,
        op SYS.ODCIPredInfo, qi sys.ODCIQueryInfo, strt number, stop number, cmpval number, env SYS.ODCIEnv) RETURN NUMBER,
      MEMBER FUNCTION ODCIIndexFetch(self IN OUT index_methods, nrows NUMBER, rids OUT SYS.ODCIridlist, env SYS.ODCIEnv) RETURN NUMBER,
      MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER
    CREATE OR REPLACE TYPE BODY index_methods IS
    STATIC FUNCTION ODCIGetInterfaces(ifclist OUT sys.ODCIObjectList) RETURN NUMBER IS
    BEGIN
      ifclist := sys.ODCIObjectList(sys.ODCIObject('SYS','ODCIINDEX2'));
      RETURN ODCIConst.Success;
    END ODCIGetInterfaces;
    STATIC FUNCTION ODCIIndexCreate (ia sys.ODCIIndexInfo, parms VARCHAR2,  env sys.ODCIEnv) RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexCreate;
    STATIC FUNCTION ODCIIndexDrop(ia sys.ODCIIndexInfo, env sys.ODCIEnv) RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexDrop;
    STATIC FUNCTION ODCIIndexAlter (
      ia sys.ODCIIndexInfo,
      parms IN OUT VARCHAR2,
      altopt NUMBER,
      env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexAlter;
    STATIC FUNCTION ODCIIndexUpdPartMetadata(
      ia sys.ODCIIndexInfo,
      palist sys.ODCIPartInfoList,
      env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexUpdPartMetadata;
    STATIC FUNCTION ODCIIndexExchangePartition(
      ia sys.ODCIIndexInfo,
      ia1 sys.ODCIIndexInfo,
      env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexExchangePartition;
    STATIC FUNCTION ODCIIndexInsert(
       ia sys.ODCIIndexInfo,
       ridlist sys.ODCIRidList,
       newvallist sys.ODCINumberList,
       env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      return ODCIConst.Success;
    END;
    STATIC FUNCTION ODCIIndexDelete(
       ia SYS.ODCIIndexInfo,
       rid VARCHAR2,
       oldval number,
       env SYS.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      return ODCIConst.Success;
    END;
    STATIC FUNCTION ODCIIndexUpdate(
       ia SYS.ODCIIndexInfo,
       rid VARCHAR2,
       oldval number,
       newval number,
       env SYS.ODCIEnv)
    RETURN NUMBER AS
    BEGIN
      return ODCIConst.Success;
    END;
    STATIC FUNCTION ODCIIndexStart(
      sctx IN OUT index_methods,
      ia SYS.ODCIIndexInfo,
      op SYS.ODCIPredInfo,
      qi sys.ODCIQueryInfo,
      strt number,
      stop number,
      cmpval  number,
      env SYS.ODCIEnv)
    RETURN NUMBER AS
    BEGIN
      sctx := index_methods(1);
      return ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIIndexFetch(
      self IN OUT index_methods,
      nrows NUMBER,
      rids OUT SYS.ODCIridlist,
      env SYS.ODCIEnv)
    RETURN NUMBER AS
    BEGIN
      return ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER AS
    BEGIN
      return ODCIConst.Success;
    END;
    end;
    Problem workaround:
    --drop function test_eq_fun;
    CREATE FUNCTION test_eq_fun(a number, b number) RETURN NUMBER AS
    BEGIN
      IF a = b then
        RETURN 1;
      ELSE
        RETURN 0;
      END IF;
    END;
    --drop operator test_eq;
    CREATE OPERATOR test_eq
    BINDING (number, number) RETURN NUMBER
    USING test_eq_fun;
    --drop indextype test_index_type;
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML(number, sys.ODCINumberList)
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    --drop table test_table;
    CREATE TABLE test_table (id NUMBER (19,0));
    CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type;
    insert into test_table values (1);

    I get single for 1 row and batch for 2 or more rows in the following simplified simulation.
    SCOTT@orcl12c> DESC SYS.ODCINUMBERLIST
    SYS.ODCINUMBERLIST VARRAY(32767) OF NUMBER
    SCOTT@orcl12c> CREATE OR REPLACE TYPE index_methods AS OBJECT
      2  (
      3    step number,
      4    STATIC FUNCTION ODCIGetInterfaces(ifclist OUT SYS.ODCIObjectList) RETURN NUMBER,
      5    STATIC FUNCTION ODCIIndexCreate (ia SYS.ODCIIndexInfo, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
      6    STATIC FUNCTION ODCIIndexAlter (ia sys.ODCIIndexInfo, parms IN OUT VARCHAR2, altopt number, env sys.ODCIEnv) RETURN NUMBER,
      7    STATIC FUNCTION ODCIIndexDrop(ia SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      8    STATIC FUNCTION ODCIIndexExchangePartition(ia SYS.ODCIIndexInfo, ia1 SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      9    STATIC FUNCTION ODCIIndexUpdPartMetadata(ia sys.ODCIIndexInfo, palist sys.ODCIPartInfoList, env sys.ODCIEnv) RETURN NUMBER,
    10    STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, rid in VARCHAR2,  newval in NUMBER, env in SYS.ODCIEnv) RETURN NUMBER,
    11    STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList,  newvallist in your_type, env in SYS.ODCIEnv) RETURN NUMBER,
    12    STATIC FUNCTION ODCIIndexDelete(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, env SYS.ODCIEnv) RETURN NUMBER,
    13    STATIC FUNCTION ODCIIndexUpdate(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, newval number, env SYS.ODCIEnv) RETURN NUMBER,
    14    STATIC FUNCTION ODCIIndexStart(sctx IN OUT index_methods, ia SYS.ODCIIndexInfo,
    15       op SYS.ODCIPredInfo, qi sys.ODCIQueryInfo, strt number, stop number, cmpval number, env SYS.ODCIEnv) RETURN NUMBER,
    16    MEMBER FUNCTION ODCIIndexFetch(self IN OUT index_methods, nrows NUMBER, rids OUT SYS.ODCIridlist, env SYS.ODCIEnv) RETURN NUMBER,
    17    MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER
    18  );
    19  /
    Type created.
    SCOTT@orcl12c> CREATE OR REPLACE TYPE BODY index_methods IS
      2  STATIC FUNCTION ODCIGetInterfaces(ifclist OUT sys.ODCIObjectList) RETURN NUMBER IS
      3  BEGIN
      4    ifclist := sys.ODCIObjectList(sys.ODCIObject('SYS','ODCIINDEX2'));
      5    RETURN ODCIConst.Success;
      6  END ODCIGetInterfaces;
      7
      8  STATIC FUNCTION ODCIIndexCreate (ia sys.ODCIIndexInfo, parms VARCHAR2,  env sys.ODCIEnv) RETURN NUMBER IS
      9  BEGIN
    10    RETURN ODCIConst.Success;
    11  END ODCIIndexCreate;
    12
    13  STATIC FUNCTION ODCIIndexDrop(ia sys.ODCIIndexInfo, env sys.ODCIEnv) RETURN NUMBER IS
    14  BEGIN
    15    RETURN ODCIConst.Success;
    16  END ODCIIndexDrop;
    17
    18  STATIC FUNCTION ODCIIndexAlter (
    19    ia sys.ODCIIndexInfo,
    20    parms IN OUT VARCHAR2,
    21    altopt NUMBER,
    22    env sys.ODCIEnv)
    23  RETURN NUMBER IS
    24  BEGIN
    25    RETURN ODCIConst.Success;
    26  END ODCIIndexAlter;
    27
    28  STATIC FUNCTION ODCIIndexUpdPartMetadata(
    29    ia sys.ODCIIndexInfo,
    30    palist sys.ODCIPartInfoList,
    31    env sys.ODCIEnv)
    32  RETURN NUMBER IS
    33  BEGIN
    34    RETURN ODCIConst.Success;
    35  END ODCIIndexUpdPartMetadata;
    36
    37  STATIC FUNCTION ODCIIndexExchangePartition(
    38    ia sys.ODCIIndexInfo,
    39    ia1 sys.ODCIIndexInfo,
    40    env sys.ODCIEnv)
    41  RETURN NUMBER IS
    42  BEGIN
    43    RETURN ODCIConst.Success;
    44  END ODCIIndexExchangePartition;
    45
    46  STATIC FUNCTION ODCIIndexInsert(
    47      ia sys.ODCIIndexInfo,
    48      rid VARCHAR2,
    49      newval NUMBER,
    50      env sys.ODCIEnv)
    51  RETURN NUMBER IS
    52  BEGIN
    53    dbms_output.put_line ('single');
    54    return ODCIConst.Success;
    55  END;
    56
    57  STATIC FUNCTION ODCIIndexInsert(
    58      ia sys.ODCIIndexInfo,
    59      ridlist sys.ODCIRidList,
    60      newvallist your_type,
    61      env sys.ODCIEnv)
    62  RETURN NUMBER IS
    63  BEGIN
    64    dbms_output.put_line ('batch');
    65    return ODCIConst.Success;
    66  END;
    67
    68  STATIC FUNCTION ODCIIndexDelete(
    69      ia SYS.ODCIIndexInfo,
    70      rid VARCHAR2,
    71      oldval number,
    72      env SYS.ODCIEnv)
    73  RETURN NUMBER IS
    74  BEGIN
    75    return ODCIConst.Success;
    76  END;
    77
    78  STATIC FUNCTION ODCIIndexUpdate(
    79      ia SYS.ODCIIndexInfo,
    80      rid VARCHAR2,
    81      oldval number,
    82      newval number,
    83      env SYS.ODCIEnv)
    84  RETURN NUMBER AS
    85  BEGIN
    86    return ODCIConst.Success;
    87  END;
    88
    89  STATIC FUNCTION ODCIIndexStart(
    90    sctx IN OUT index_methods,
    91    ia SYS.ODCIIndexInfo,
    92    op SYS.ODCIPredInfo,
    93    qi sys.ODCIQueryInfo,
    94    strt number,
    95    stop number,
    96    cmpval  number,
    97    env SYS.ODCIEnv)
    98  RETURN NUMBER AS
    99  BEGIN
    100    sctx := index_methods(1);
    101    return ODCIConst.Success;
    102  END;
    103
    104  MEMBER FUNCTION ODCIIndexFetch(
    105    self IN OUT index_methods,
    106    nrows NUMBER,
    107    rids OUT SYS.ODCIridlist,
    108    env SYS.ODCIEnv)
    109  RETURN NUMBER AS
    110  BEGIN
    111    return ODCIConst.Success;
    112  END;
    113
    114  MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER AS
    115  BEGIN
    116    return ODCIConst.Success;
    117  END;
    118  end;
    119  /
    Type body created.
    SCOTT@orcl12c> CREATE FUNCTION test_eq_fun(a number, b number) RETURN NUMBER AS
      2  BEGIN
      3    IF a = b then
      4       RETURN 1;
      5    ELSE
      6       RETURN 0;
      7    END IF;
      8  END;
      9  /
    Function created.
    SCOTT@orcl12c> CREATE OPERATOR test_eq
      2  BINDING (number, number) RETURN NUMBER
      3  USING test_eq_fun
      4  /
    Operator created.
    SCOTT@orcl12c> CREATE INDEXTYPE test_index_type
      2  FOR
      3  test_eq(number, number)
      4  USING index_methods
      5  WITH ARRAY DML(number, your_type)
      6  WITH LOCAL RANGE PARTITION
      7  WITH SYSTEM MANAGED STORAGE TABLES
      8  /
    Indextype created.
    SCOTT@orcl12c> CREATE TABLE test_table (id NUMBER (19,0))
      2  /
    Table created.
    SCOTT@orcl12c> CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type
      2  /
    Index created.
    SCOTT@orcl12c> insert into test_table values (1)
      2  /
    single
    1 row created.
    SCOTT@orcl12c> insert into test_table
      2  select 2 from dual union all
      3  select 3 from dual
      4  /
    batch
    2 rows created.
    SCOTT@orcl12c> insert into test_table select deptno from dept
      2  /
    batch
    4 rows created.
    SCOTT@orcl12c> insert into test_table select object_id from user_objects
      2  /
    batch
    34 rows created.
    SCOTT@orcl12c>

  • When/How to use - "search" parameter type in parameter like other types.

    We recently upgraded BI Publisher to 10.1.3.4. I saw new parameter type "search" in parameter section, when creating report. whats the use of it? How to use it ? like other parameter type Text, Menu,Hidden, Date.
    I couldn't find any help or release notes on this !
    Thanks
    Ayaps

    I started looking into this parameter type when our drop-down for customer numbers went from 13,000 (manageable) to 45,000 (completely unmanageable).
    I imagine this is supposed to mimic the effects of a "Long List" type LOV in Oracle Applications (as I had inquired about in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=895521&stqc=true|Large List of Values (LoV) hangs. Is there an equivalent for a long list?]), but performance-wise, "Search" does not seem to be any more efficient that using the "Menu" type LOV. Even with the help of having a partial string with a wildcard to match, the "Search" still takes too long to pull up to be of any use to us.

  • Parameter type in stored procedure call

    What is the best way using ODP.net to reference the parameter type?
    I have several stored procedure in a Oracle 9i database.
    The database looks like:
    Name Null? Type
    FLTID NOT NULL NUMBER(10)
    PLANEID NOT NULL VARCHAR2(3)
    The call in my VB.net app is:
    cmd = New OracleCommand("AeronauticsUtils.Flights_insert", conn)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.Add(New OracleParameter("fID", OracleDbType.Int32, ParameterDirection.Input)).Value = row("FLTID")
    cmd.Parameters.Add(New OracleParameter("plnid", OracleDbType.Varchar2, ParameterDirection.Input)).Value = row("PLANEID")
    cmd.ExecuteNonQuery()
    cmd.Dispose()
    What should I use?
    OracleDbType.Int32
    OracleType.VarChar
    Types.OracleDecimal
    or something else?

    I use OracleDbType.Decimal for NUMBER columns and OracleDbType.Varchar2 for VARCHAR2 columns.
    Are you having issues?
    - Mark
    ===================================================
    Mark A. Williams
    Oracle DBA
    Author, Professional .NET Oracle Programming
    http://www.apress.com/book/bookDisplay.html?bID=378

  • IN,OUT and IN OUT Parameter Types

    Dear All,
    as per some book,
    IN parameter uses Call by Reference
    and OUT and IN OUT Uses Call by Value
    we can use NOCOPY for Making OUT and IN OUT Call by Reference.
    my small doubt is
    when u r passing a reference of a Variable how oracle takes care that only IN Parameter are not allowed to change (in c and c++ we can say *para to access the variables) ,
    i mean in case i use NOCOPY all parameter type are using CALL BY REFERENCE then how the "No Modify" is forced in case of IN Parameter.
    Thanks for Reading Request.
    Raj.

    The pl/sql compiler will simply not allow you to have a stmt that assigns something to an "IN" parameter. It can fully be enforced at compile time.
    Tom Best

  • How to use INVOKE function with INT parameter types

    Can you tell me how to use invoke function with int parameter type ?

    Pass the int as an Integer.

  • Web service: parameter types

    Hi,
    We made an ABAP webservice with input parameters.
    In the WSDL the type of the parameters is:
    - <wsdl:message name="ZTestWebService2">
    <wsdl:part name="Costcenter" type="n0:char10" />
    The type ‘char10’ is defined like:
    - <xsd:simpleType name="char10">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="10" />
      </xsd:restriction>
      </xsd:simpleType>
    Question is: is there a way to influence the creation of this types, so that the type is not referring to ‘n0:char10’ but to something like ‘char’ and that the length is also defined in the part name ? Something that is more Java friendly and will not create code for complex types on the client-side ?
    Thanks,
    Rolf.

    HI,
    No u cant change this parameter dynamically after the release of web service.
    When u will release the webservice for a RFC,the WSDL file will be generated.That time it will generate the files for every parameter types which are used in the RFC.
    If u want increase this value length,Then u hv to increase the lenght of the parameter in RFC and then release the web service.So that it will come here.
    Bcause in webservice lenght will not allow more that the lenghth which u gave in RFC.
    Regs
    Manas Ranjan Panda

  • [Trend Micro Ios content filtering] parameter-type command under policy map not available

    Hi, all:
    I'm trying to configure TrendMicro IOS content filtering. I have this working on a separate box, running 15.1.
    On this particular testbed, I have a 2900 running:
    System image file is "flash0:c2900-universalk9-mz.SPA.152-3.T1.bin"
    And the following licensing:
    Technology Package License Information for Module:'c2900'
    Technology    Technology-package           Technology-package
                  Current       Type           Next reboot 
    ipbase        ipbasek9      Permanent      ipbasek9
    security      securityk9    Permanent      securityk9
    uc            uck9          Permanent      uck9
    data          datak9        Permanent      datak9
    Configuration register is 0x2102
    CUBE_GOLD_MEX#show ip trm subscription status
           Package Name:  Security & Productivity (Trial)
                 Status:  Active
    Status Update Time:  18:02:51 CST Mon Jul 23 2012
        Expiration-Date:  Mon Aug 20 02:00:00 2012
        Last Req Status:  Processed response successfully
    Last Req Sent Time:  18:02:51 CST Mon Jul 23 2012
    CUBE_GOLD_MEX#
    Also, I have the following config lines on it:
    ip host trps.trendmicro.com 216.104.8.100
    ip name-server 4.2.2.2
    ip cef
    multilink bundle-name authenticated
    parameter-map type urlfpolicy trend tm-pmap
    allow-mode on
    [snip]
    parameter-map type trend-global trend-glob-map
    class-map type inspect match-all http-imap
    match protocol http
    class-map type urlfilter trend match-any drop-category
    match url category Abortion
    match url category Activist-Groups
    match url category Adult-Mature-Content
    match url reputation ADWARE
    match url reputation DIALER
    match url reputation DISEASE-VECTOR
    match url reputation HACKING
    match url reputation PASSWORD-CRACKING-APPLICATIONS
    match url reputation PHISHING
    match url reputation POTENTIALLY-MALICIOUS-SOFTWARE
    match url reputation SPYWARE
    match url reputation VIRUS-ACCOMPLICE
    policy-map type inspect urlfilter trend-policy
    class type urlfilter trend drop-category
    I have not been able to get to the good part of configuring the ZBF.
    I've looked over several configuration examples and can't figure out what I'm doing wrong, since I'm not able to see the command 'parameter-map' under the 'policy-map urlfiltering'
    XXXXXX(config)#policy-map type inspect urlfilter trend-policy
    XXXXXX(config-pmap)#?
    Policy-map configuration commands:
      class        policy criteria
      description  Policy-Map description
      exit         Exit from policy-map configuration mode
      no           Negate or set default values of a command
    XXXXXX(config-pmap)#
    I thought it might be an issue with version 15.2.3, but according to configuration guides, commands are the same.
    Can anyone provide some assistance?
    TIA.
    c.

    Hi Carlos,
    I am having the same problem.  I have seen a few diffenent configuration examples and they all show adding the "parameter type urlfpolicy trend parm-map-name" command but it doesn't exist, at least in 15.2(3)T1 and I see it listed in the the IOS documentation for 15.2.  Maybe they forgot it :-)
    I guess I will open a TAC case as I do not want to downgrade...
    I will keep you posted if I find the answer.
    Regards,
    Troy

  • List as function parameter type

    Hi,
    how to declare list parameter type in function ? I want to call function with list, param2 = ('A', 'B', 'C'...) for example: function(param1, param2)
    thx

    Two ways....
    either you know you have a maximum number of parameters allowed and specify it such as ...
    e.g. with a maximum of 10 params...
    FUNCTION myfunc (p_param1 IN VARCHAR2 := NULL
                    ,p_param2 IN VARCHAR2 := NULL
                    ,p_param3 IN VARCHAR2 := NULL
                    ,p_param4 IN VARCHAR2 := NULL
                    ,p_param5 IN VARCHAR2 := NULL
                    ,p_param6 IN VARCHAR2 := NULL
                    ,p_param7 IN VARCHAR2 := NULL
                    ,p_param8 IN VARCHAR2 := NULL
                    ,p_param9 IN VARCHAR2 := NULL
                    ,p_param10 IN VARCHAR2 := NULL) IS
    ...or you pass in an array...
    TYPE t_params IS TABLE OF VARCHAR2 INDEX BY PLS_INTEGER;
    FUNCTION myfunc (p_params IN t_params) IS
    ...You can't code it for an unknown amount of parameters.

  • Inconsistent input parameter

    Hi
    I am seeing the following error when trying to use the "Display Data" menu option on an Infocube: "Inconsistent input parameter (parameter: i_sid, value 0)".
    I have created about the simplest Infocube that I know of to try to resolve this, with OCalDay in the Time dimension, a simple custom SKU Characteristic in Dimension 1, and only one Key Figure. I have loaded only one record into the InfoCube, and the corresponding SKU and 0CalDay objects are populated with data (and it appears to hold referential integrity.
    I do not have anything within the Unit dimension. Do I need something? What can I put in as a dummy?
    But if Unit is not a problem, any other ideas why I am seeing this error?
    Thanks
    Al.

    Hi,
    During the creation of keyfigure, did you mention anything under Currency/Unit of Measure. If you have mentioned any fixed currency there, then while creating transformation in Rule details of that keyfigure, under Currency, you mentiond fixed currency and No Conversion.
    This should solve the issue.
    Best Regards,
    Rajani

  • Generic Method, How parameter type is determined

    For method
    <T> void fromArrayToCollection(T[] a, Collection<T> c) { ... } Why does
    fromArrayToCollection(sa, co);passes and
    fromArrayToCollection(oa, cs); fails.
    oa - Object Array, Object[]
    cs - Collection of String, Collection<String>
    sa - String Array, String[]
    co - Collection of Object, Collection<Object>
    What are the rules governing the type of T inferred by compiler?

    epiphanetic wrote:
    I think you still haven't fully understood the issue.
    I suggest, you also read the same generics tutorial by Gilad Bracha, section 6 from where I found this issue :). Ha! But I think it's misleading that that section uses arrays.
    In his words "It will generally infer the most specific type argument that will make the call type-correct." Its also mentioned that collection parameter type has to be supertype of Array parameter type but no reason is given. I wonder why it fails to infer correct type in second case.Assume you passed in an array of Objects, and a Collection of Strings, and it was possible that T would then be Object. Using Bracha's example implementation:
    static <T> void fromArrayToCollection(T[] a, Collection<T> c) {
       for (T o : a) {
          c.add(o); // correct
    }Now imagine you had this code making use of it:
    Object[] objects = {Integer.valueOf(1), "hi", new Object()};
    Collection<String> strings = new LinkedList<String>();
    fromArrayToCollection(objects, strings);
    String string = strings.iterator().next(); //get first String, which is actually an IntegerTrying to get the first String would give a ClassCastException. So clearly that method cannot not be safely invoked.
    The reason I think he's confusing things by using the array is because you might get it in your head that this would be OK:
    static <T> void fromCollectionToCollection(Collection<T> one, Collection<T> two) {
       for ( T t : one ) {
          two.add(t);
    Collection<Object> col1; Collection<String> col2;
    doSomething(col1, col2);When clearly it's unsafe, as now your Collection of Strings might have a non-String in it! That's why I said this is more a nuance of generic arrays than of type inference proper.

  • Error Inconsistent input parameter (parameter: i_sid,value 0)

    Hi ,
    i got this error "Error Inconsistent input parameter (parameter: i_sid,value 0)" after i execute the query that i have created. How can i solve this problem?
    regards,
    soonwee

    Hello,
    (I know, the answer is a year late, but at least it will be documented for the future: i've recently had the same error in my system)
    I have debugged the problem and found that the exception happens somewhere after Include LRSDRC_INFOCUBEF06, form BASIC_QUERY_DATA_GET_ROLAP and  PERFORM check_for_request0.
    You can also get this error if you execute the transaction LISTCUBE for the Infocube, or if you click on "display data" in the context menu of an InfoCube in RSA1.
    The reason for the problem seems to be the missing "initial" record in the InfoObject "REQUID".
    This InfoObject tracks all the requests/data packages in your BW system, and usually has the similar contents:
    select * from /BI0/SREQUID
    REQUID                                            SID         CHCKFL DATAFL INCFL
                                                                    0          X     X     X
    REQU_4D9N9016ZEBZXYL3FKRS5Z5BK    8             
    ODSR_4D9N908VICXPGL4JLEU4G141C     9
    However, if the initial record with SID = 0 is missing, you may get the described error.
    The problem can be fixed by adding this record to two tables:
    (example for adding this record from the DB2 SQL interpreter; syntax may be slightly different with other DB platform)
    insert into "/BI0/SREQUID" values ('',0,'X','X','X')
    insert into "/BI0/RREQUID" values (0,'')
    (NOTE: the '' are two single quotes without any value between them, and not the double quote mark   )
    Hope this helps.
    Kind regards,
    Sergiy Malikov.
    SAP BI on DB2 for Linux, Unix and Windows
    Edited by: Sergiy Malikov on Mar 27, 2009 1:53 PM

Maybe you are looking for