System.InvalidCastException: 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.DataBind(); line
DataSet ds = new DataSet();
oWS = new Workspace();
oWS.getHighlight(ref ds, WEDList.SelectedItem.Value,
ProjectList.SelectedItem.Value, "Highlights");
MyDataGrid.DataSource=ds.Tables["Highlights"].DefaultView;
MyDataGrid.DataBind();
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_Project_PK
and Category_FK(+)=Category_PK;
END getHighlight;
I cant figure out what the problem is.
Any ideas?
Jeff