MS SQL Stored Procedures - Multiple Result Sets
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
  Dim SP As New Tornado.z
  With SP
    .dbQP = "Unit=1|S=7|Pagesize=-1|NavigationItem=None|Th=ti=Simple SP|Pv=OleDB|Dt=SQL"
    .dbDSN = "fujitsu;pubs;sa;sa"
    .dbStoredProc = "spname=reptq1" '... Add dbResultSet = n to get the 'n' result set
    .ASPdbSP() '...use .ASPdbSP("getall=true") to get all result sets

    .dbQP = "Unit=2|S=7|Pagesize=-1|NavigationItem=None|Th=ti=Simple SP - Get All|Pv=OleDB|Dt=SQL"
    .dbDSN = "fujitsu;pubs;sa;sa"
    .dbStoredProc = "spname=reptq1" 
    .ASPdbSP("Getall=true") 
 End With
End Sub
</script>

This examples has 2 modules of simple StoredProcedures. The first one retrieves the 1st resultset and the second one gets all the resultsets by just specify the 'Getall=true'.

Note: Cut/Paste this code and adjust the DSN to your MS-SQL server setting. SQL server not available for demo.


Send comments on this topic.
Copyright (c) 1998-2006 ASP-db