Results 1 to 10 of 11

Thread: SQL Lab

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Fresno, CA
    Posts
    1,072

    Default SQL Lab

    SQL Lab is a little side project I developed to learn a few new things, try a few new techniques out and automatically generate code that we could use in our applications to execute SQL queries and fetch results. The primary motivations behind writing it were:
    • I got tired of concatenating strings with SQL statements and going through multiple edit/compile/test/debug cycles. You don't find out if there is an error in your SQL until runtime, so I thought it would be helpful to write/debug/test the SQL first and then have an easy way to take a completed query and put it into a DataFlex program.
    • I realized that I didn't want to write keep writing SQL fetch loops (including doing all of the object setup work) for every report where I wanted to boost performance by adding a SQL query. That code is basically boilerplate, why not put it in a subclass?


    After writing it, I found that it is useful in some other situations:
    • Testing connectivity to SQL Servers at customer sites.
    • Executing queries when I don't have access to SSMS.
    • Benchmarking SQL query execution/result fetching.
    • Providing an ad hoc query system for customers and support personnel.


    If you have used SQL Server Management Studio to run SELECT queries and get results, it is something like that (but with extras for DataFlex)

    In the Help folder, there is an "Intro to SQL Lab.pdf" that is a good starting point. (If I have some time later, I'll put together a short intro video that shows off the main features.)

    The workspace file is for 17.1. You can of course recompile under 18.0 (there is even code to use the new FetchRowValues method under 18.0).
    Attached Files Attached Files
    Best regards,

    Matt Davidian
    Datatech
    Fresno, CA
    www.datatechag.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •