Question about return type of RetrievalProcedures 's functions

Posts   
 
    
hilen
User
Posts: 13
Joined: 23-Sep-2005
# Posted on: 23-Sep-2005 10:52:00   

Hi, I'm new to LLBLGen Pro, and I have a question about the return type of RetrievalProcedures functions, which are wrapper for SPs that return resultset (as I understand): Almost every functions return DataTable, but there're a few ones return DataSet, and I don't know why, and what will affect this behavior?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 23-Sep-2005 11:23:00   

The ones returning a dataset have 2 or more resultsets (determined by sqlserver that is).

so if you do: CREATE PROCEDURE pr_testproc AS SELECT * FROM Customers SELECT * FROM Orders

you'll get 2 resultsets. Filling a dataset with this proc will give you a dataset with 2 datatables. Hence the returntype of a dataset simple_smile . The others are a datatable because the datatable is smaller than a dataset.

Frans Bouma | Lead developer LLBLGen Pro
hilen
User
Posts: 13
Joined: 23-Sep-2005
# Posted on: 23-Sep-2005 11:46:32   

Thank you, I see that there's an "Amount ResultSet" property for each Retrieval SP in LLBLGen Pro, but it's not refresh when I refresh catalog

I have a SP that return 2 resultsets --> Amount ResultSet = 2 but when I modify the SP so it returns 1, then refresh catalog --> Amount Resultsets is still 2

I have to drops my SP, refresh catalog, then regenerate code, then recreate SP, then refresh catalog,
add my SP (now Amount ResultSet = 1), cry , then regenerate code oh my god cry

Just remove SP from Retrieval Procedure Collection in LLBLGen Pro, and then add it again, does not work. frowning

I think refresh catalog feature should be able to realize this kind of changes, but it dosen't, or am I missing something ?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 23-Sep-2005 12:05:02   

hilen wrote:

Thank you, I see that there's an "Amount ResultSet" property for each Retrieval SP in LLBLGen Pro, but it's not refresh when I refresh catalog

I have a SP that return 2 resultsets --> Amount ResultSet = 2 but when I modify the SP so it returns 1, then refresh catalog --> Amount Resultsets is still 2

I have to drops my SP, refresh catalog, then regenerate code, then recreate SP, then refresh catalog,
add my SP (now Amount ResultSet = 1), cry , then regenerate code oh my god cry

Just remove SP from Retrieval Procedure Collection in LLBLGen Pro, and then add it again, does not work. frowning

I think refresh catalog feature should be able to realize this kind of changes, but it dosen't, or am I missing something ?

No, the value is preserved to avoid having to set it again in the designer. Because sometimes you have to set it in the designer because sqlserver makes a mistake in reporting the number of resultsets, for example with procs which use a temptable.

To correct the value, go to the catalog explorer, browse to the procedure, click open the node and you'll see #2. Right click it and select change. Change it to the value you want it to have.

Frans Bouma | Lead developer LLBLGen Pro
hilen
User
Posts: 13
Joined: 23-Sep-2005
# Posted on: 23-Sep-2005 12:21:01   

ah, I see, thank you very much simple_smile