Jump to content

Dataset - Getting Rows From Refcursor


Guest jetmantrunks

Recommended Posts

Guest jetmantrunks

i have a dataset (.xsd file). i need to add a query to the table adapter using "start with" and "connect by" but when i try to use that select i get a message saying the syntax is wrong, apperantly it doesnt recognize the usage of "connect by" and "start with".what i did the last time was write a stored procedure (all i needed was 1 specific int) and since "use existing stored procedure" is greyed out for me i used a query of "select func(:user_id) from DUAL" to get the value from the function.so far so good (sort of). but now i need to use "connect by" again and this time get multiple rows so i can no longer use a function returning NUMER. i was told to use a sys_refcursor as the return type in the stored procedure and it works, but when i use "select func(:user_id) from DUAL" in the adapter on that function it tells me "RSET is not a known type" or something like that, meaning it cant handel sys_refcursor.how can i work around this? if i change the function to a procedure and just do a normal select would that fetch the records back to the dataset in a useable form?another way i was offered was to somehow open the sys_refcursor at the end of the select and that would output the records in a normal manner. anyone got an idea how and if it would work?thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...