Showing posts with label cursor. Show all posts
Showing posts with label cursor. Show all posts

Monday, March 19, 2012

How to get source by execution oracle sp using ref cursor

Hi,

I need to get recordset returned by oracle sp in execute sql task to process futher in For Each Loop container and on same lines i want to use oracle sp for extraction data in Data Flow Task. Could anybody suggest if it how we could do it in SSIS?

All suggestions will be highly appreciated.

Thanks,

Lalit

You should be able to do this. Is there a specific problem you are encountering?|||There is no variable type in SSIS that maps to refcursor type in Oracle. I don't think a variable of type object can be used for this either. So I guess you cannot execute Oracle SP using Execute SQL task to get the recordset.

Friday, February 24, 2012

How to get IRowsetPosition...

Hello everyone.

I make the IRowset form IOpenRowset::OpenRowset() method because I want to use the base type cursor, scrollable and updatable.

But I don't know how to get the IRowsetPosition in this case..

I want to know the current cursor position after calling IRowset::GetNextRows().

I'm developing MFC application using OLE DB interface in VM5.

Thanks in advance..

You could read the identity column?|||When using a base table cursor the best approach to do what you want is to use the bookmark column (at column index 0). You must expose the IRowsetBookmark (if memory serves me well) and then you can reposition the cursor on any bookmark of the open rowset.|||

Thank you..

After posting my question, I updated my code by IRowsetBookmark and it worked.

Now I have the confidence that the way I did is the best.. :-)

Anyway..

Is there no way to get the IRowsetPosition..? just for curiosity