Hi!
My stored procedure returns cursor. I'd like to view data from this cursor in DBGrid. Sometimes all is OK, sometimes I don't get any data in DBGrid even my cursor is very simple, just like select * from company, without any input parameters.
I use CBuilder 5, ODAC 5.00 and this is my technology.
I have SmartQuerySelectData, SmartQueryToDBGrid, DataSourceCursor and DBGridCursor.
DataSourceCursore->DataSet=SmartQueryToDBGrid ;
DBGridCursor->DataSource=DataSourceCursor;
I select data
SmartQuerySelectDate->SQL->Add("BEGIN my.pack.my_proc( OutCursor OUT REFCURSORType); END;")
SmartQuerySelectDate->Execute();
then I link SmartQuerySelectDate and SmartQueryToDBGrid:
SmartQueryToDBGrid->Cursor=SmartQuerySelectDate ->ParamByName("OutCursor")->AsCursor;
then I open my cursor
SmartQueryToDBGrid->Open();
Probably some mistakes can appear in this code - this is not working code, but example only.
Once again, sometimes I get correct data, with many input parameters and complex query in my proc. Sometimes I don't get data.
What's wrong in my code? May be some SmartQuery properties must by set ?
Thank you very much for your help.