Free Trial Issue of Visual Studio Magazine

Figure 3. | Pass the Query Parameters to the Stored Procedure. Parameter values you supply to the stored procedure pass to the function to create a temporary table that serves as the record source for the final crosstab table (see Listing 2). Each set of parameter values creates a new crosstab table named tbQueryName_ paramval1[_paramval2]. The multiple tables clutter your database, but their size usually is quite small. This example uses an extended version of Access 2002's NorthwindCS database, which contains 22,000 Orders and 163,000 Order Details records.