Error Message: Specified cast is not valid.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Reed

    #1

    Error Message: Specified cast is not valid.

    System.InvalidC astException: Specified cast is not valid.

    I am using C# and backend is Oracle9i. I am using
    ODP.NET for data access provider.

    As ODP says.. it converts Oracle NUMBER type to
    System.Decimal and I dont know if this has something to
    do with the error.

    The error occurs on: MyDataGrid.Data Bind(); line

    DataSet ds = new DataSet();
    oWS = new Workspace();
    oWS.getHighligh t(ref ds, WEDList.Selecte dItem.Value,
    ProjectList.Sel ectedItem.Value , "Highlights ");
    MyDataGrid.Data Source=ds.Table s["Highlights "].DefaultView;
    MyDataGrid.Data Bind();

    The data itself is fine and the package procedure is
    working fine.

    procedure getHighlight
    (p_WED_PK in Int, p_Project_PK in Int, ReturnCursor
    out retcur)
    as
    BEGIN
    OPEN ReturnCursor FOR
    Select Highlight_PK, Summary, DateRecorded,
    Assigned_FK, User_FK, WED_FK, Category, Category_FK
    From Highlights, Category
    Where WED_FK = p_WED_PK and
    Assigned_FK=p_P roject_PK
    and Category_FK(+)= Category_PK;
    END getHighlight;

    I cant figure out what the problem is.

    Any ideas?

    Jeff



Working...