CallRetrievalStoredProcedure and dataSetToFill

Posts   
 
    
Jamison avatar
Jamison
User
Posts: 14
Joined: 22-Dec-2006
# Posted on: 07-Aug-2007 16:34:08   

I want to use the retrieval stored procedures to fill a typed dataset. Is there a switch in the template setups that will cause my retrieval stored procedures to use "CallRetrievalStoredProcedure" to return datasets instead of datatables?

It currently uses DataAccessAdapter.CallRetrievalStoredProcedure(storedProcedureToCall As String, parameters() As SqlParameter, tableToFill As DataTable)

I would like it to use DataAccessAdapter.CallRetrievalStoredProcedure(storedProcedureToCall As String, parameters() As SqlParameter, dataSetToFill As DataSet)

Environment: LLBLGen Pro v2.0.0.0Final SQL Server 2000 VB.Net, .Net 2.0, Adapter group, SD.Presets.Adapter.General2005

Thank you, Jamison

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 07-Aug-2007 18:16:06   

This is chosen based on the # of resultsets determined in the designer.

So if you go to the catalog explorer, browse to the procedure and rightclick the '1' node under # resultsets, you can change the value. Make it 2 and your proc will be generated to fetch a dataset instead. (so every resultset gets its own datatable)

It's more overhead, so I'd only do this with procs which actually do return 2 or more resultsets. Otherwise I'd add the datatable to a dataset manually.

Frans Bouma | Lead developer LLBLGen Pro