News
Map
About

 


ODBC Query Tool

What is it?

"The ODBC Query Tool is a menu-based suite in Frontier that greatly simplifies ad-hoc querying of ODBC-compliant data sources."

Ok. Cut the crap and the buzzwords. What is it really? Well, in a nutshell it's just like MS Query, but better.

What does it do?

It allows you to easily write SQL queries to the database of your choice.
It also lets you save, load and delete queries.
It also allows you to choose the format in which the queries will be returned: text, lists or records

How to use it

To use the ODBC Query Tool, select it in the Main->Suites menu. You will then have access to the ODBC Query Tool menu.
If you can't see it in the Suites menu, run the odbc.init() script. You probably forgot to run it. If you still can't see it, quit and restart Frontier. If you still can't see it, report it as a bug to henri@binarycompass.com.



Preferences Menu

The query tool in 7 quick steps

  1. Select Main->Suites->ODBC Query Tool.
    This will give you access to the query tool menu. From now on, all menu calls are from the query tool menu
  2. Select Preferences->Format Results As->Text
    Here you choose to have your results displayed in text format, using the default row and column delimiters (see ODBC Functions)
  3. Make sure your connection parameters are correct. (see Installation of the ODBC extension to Frontier)
  4. Select Edit SQL Query...
    A text window pops up. Write a valid SQL query to the data source you have chosen in your setup.
  5. Select Run Query
    This will run the query you entered. Wait a short while, and the results window will pop up. Hopefully, good data was returned.
    If you see an error, fix your query in the query window, and try again. You don't need to close the query window when selecting Run Query.
  6. You like this query you just got results for, and you'd like to keep it for future reference. Select Save Query...
  7. Name your query. Make it descriptive and unique.

That's it! If you want to retrieve your saved query at a later date, just select Load Query and choose that query.

Note: You can manually edit your list of queries by going to the table user.prefs_odbc.queries.

The ODBC Query Tool Menu

Menu Items

  • About ODBC Query Tool
    • Opens a window showing this information
  • Preferences
    • Edit Connect Params
      • To edit the connection parameters (user, password, db). Set them up once and forget them.
  • Break on Errors
    • If there is an error returned by the ODBC driver, toggles whether the ODBC extension should put up a scriptError dialog and break, or should just return the error data as part of the returned set.
  • Show SQL Query in Results
    • Toggles whether to write or not the SQL query string in the same window as the results.
      This is very useful so as to remember what query gave the results you're looking at
  • Format Results as
    • Allows you to change the way data is returned to the query result window

  • Edit SQL Query
    • Opens the window of the SQL Query for editing. You don't need to close it for the changes to be recorded.
  • Run Query
    • Runs the script to return the query results
  • View Query Results
    • Opens the window with the results of the query.
      You can keep that window open, or close it any time you want.
      The Query Tool does NOT automatically clear the results window. Do it manually.

  • Save Query...
    • Allows you to save the currently used query.
  • Load Query
    • Shows in the sub menu all the queries available that were previously saved.
      If you don't see your latest one, select the menu item "Refresh Query List"
  • Delete Query
    • Deletes the query you select. WARNING: Can't be undone!!!
  • Refresh Query List
    • Refreshes the query list after Load/Delete Query or manual changes.

  • Set Comment
    • Comments out selected SQL text. Use in the SQL Query editing window.
      If no text is selected, comments out the paragraph at the insertion point
  • Remove Comment
    • Uncomments selected text. If no text is selected, uncomments the paragraph at the insertion point

  • Edit Menu
    • For programmers only. Opens the menu for editing.

On to the next page!



Page 1: Before the installation
Page 2: Installation of the ODBC extension to Frontier
Page 3: ODBC Functions
Page 4: ODBC Query Tool
Page 5: Old DLL Versions
Page 6: Known Bugs and Limitations

[ Previous - Next ]


News - Map - About ScriptMeridian

This tutorial was written by Henri Asseily in Los Angeles, USA.
Page last revised 4/30/98; 4:31:25 PM.
Copyright © 1998 ScriptMeridian. All rights reserved
All trademarks are the property of their respective owners.
2:57:25 PM Wednesday, May 6, 1998