Home > Articles

  • Print
  • + Share This
Like this article? We recommend

Nearing the Solution of Zeno's Paradox

We've come a long way, but the finish line is in sight at last. We have two more functions to traverse before we return a nifty little box of book recommendations to the user's MyInformIT shelf. Fortunately, these functions are a breeze. We've set the public variable sql_query_string to the necessary value. Now we call executeQueryString() to return our Recordset, RS.

1 protected Recordset
2   executeQueryString( String l_sql_query_string )
3 {
4   Recordset RS = null;
5
6   BucketDB BucketDB = new BucketDB();
7
8   if ( l_sql_query_string != null )
9   {
10    if ( !l_sql_query_string.equals("") )
11    {
12      RS = BucketDB.executeBucketQuery
        ( l_sql_query_string );
13    }
14    BucketDB = null;
15   }
16   return ( RS );
17 }

We pass our call to the BucketDB object. That should look pretty familiar, if you've been following along all this time:

1  public Recordset executeBucketQuery
2     ( String sql_query_string )
3  {
4   sql_query_string =
5   "SET TRANSACTION ISOLATION
     LEVEL READ UNCOMMITTED " + sql_query_string;

7   StoredProcedure StoredProcedure =
8    new StoredProcedure();
9
10   StoredProcedure.appendParam
11    ( "@sql_query_string",
12     AdoEnums.DataType.VARCHAR,
13     AdoEnums.ParameterDirection.INPUT,
14     4000,
15     sql_query_string );
16
17   StoredProcedure.openStandardClient
18    (Database.dsn(),
19    "sp_buckets_execute_bucket_query");
20
21   return ( (Recordset) StoredProcedure );
22
23 }

We summon our canned methods to pass the query string to the sp_buckets_execute_bucket_query stored procedure as a VARCHAR parameter. We call the stored procedure and pass the Recordset back up the chain to the ASP.

Jinkies! That was a marathon, wasn't it? Well, the many miles of training and all of those unpalatable energy bars you scarfed down have brought you to the victory stand. We got to glance at class extension, recursion, and try-catch as we ran by. You also had some old friends such as state and taxonomy cheering you on from the crowd. You should sleep well tonight after a well-earned victory. I'll toast you with a big mug of Java in the morning.

  • + Share This
  • 🔖 Save To Your Account