Foxhound is the better* Database Monitor for SQL Anywhere.
*better: More thorough, more relevant, more effective.
...more Alerts, more All Clears, more details, more control in your hands.


Breck Carter
Last modified: February 19, 1997
mail to: bcarter@bcarter.com
[Home]



QuickTips


  • ASCII Values: To include special ASCII characters in a string search on "ASCII Values" in the Help. For example, to display a symbol like © use the either the decimal or hexadecimal value: "Copyright ~169 1996" or "Copyright ~hA9 1996".

  • Auto Load: To automatically open the Library painter when launching PowerBuilder:
    c:\pb4\pb040.exe /p library

  • Case Sensitivity: SQL Anywhere command line parameters are often case sensitive. For example, "RTDSK50 -nFIRST -c256K" will work but "RTDSK50 -nFIRST -C256K" will not.

  • DisableBind: To disable the use of SQL bind variables add DisableBind=1 to DBPARM; e.g.:
    SQLCA.DBParm = "DisableBind=1," &
       + "ConnectString='DSN=MyData;UID=DBA;PWD=SQL'"
    

  • DWSyntax:

    • To copy and paste templates for DataWindow.modify() calls make a Program Manager icon for c:\pb4\examples\dwsyn40.exe.

    • To add DWSyntax to the PowerBuilder toolbar pick Window - Toolbars - Powerbar - Customize - Custom, drag a button you like from the Selected Palette to the Current Toolbar, then double-click on the new button. Set the parameters as follows:
      Command Line:   c:\pb4\examples\dwsyn40.exe
      Item Text:      DWSyn
      Item MicroHelp: Run DWSyntax

  • How To Find It: Calling Events in PowerBuilder 5 Help
    File:    \pwrs\pb5\sys\pbhlp050.hlp
    Search:  events
    Pick:    Calling object functions and events
    

  • How To Find It: Calling Modify() in PowerBuilder 4 Help
    File:    \pb4\pbhlp040.hlp
    Search:  DataWindow object attributes
    Pick:    DataWindow Object Attributes
    

  • How To Find It: Calling Modify() in PowerBuilder 5 Help
    File:    \pwrs\pb5\sys\pbhlp050.hlp
    Search:  DataWindow objects, properties
    Pick:    DataWindow object properties
    

  • How To Find It: User Groups in Watcom SQL 4 Help
    File:    \wsql40\win\pbwat040.hlp
    Search:  An example of user groups
    

  • How To Find It: User Groups in SQL Anywhere 5 Help
    File:    \sqlany50\win\dbeng50w.hlp
    Search:  Database object names and prefixes
    

  • MaxBPs: To increase the number of breakpoints available to video drivers and other Windows programs add the line MaxBPs=768 to the [386Enh] section in c:\windows\system.ini.

  • Minimalist Connect: Here's all you really need to connect to a SQL Anywhere database from PowerScript:
    SQLCA.DBMS   = "ODB"
    SQLCA.DBParm &
       = ConnectString='DSN=MyData;UID=DBA;PWD=SQL'"
    connect using SQLCA;
    if SQLCA.SQLCode <> 0 then
       MessageBox ( "Error", "Connect failed" )
       halt close
    end if
    

  • Modify() Attributes: To determine the rules for DataWindow.modify() calls open the PowerBuilder Help and search on "Modify attributes". Pick "Column" for attributes specific to individual columns or "DataWindow" for attributes of the DataWindow as a whole. If an attribute description includes "(exp)" then the value can be specified as an expression, otherwise a literal must be used.

  • Optimizing SQL: For some quick tips about making your SQL run faster, see Optimizing SQL.

  • PBDebug: To trace the execution of a PowerBuilder executable change the command line to c:\yourdir\yourpgm.exe /pbdebug. Run your program, then look in c:\yourdir\yourpgm.dbg.

  • pbm_dwnprocessenter: A user event corresponding to pbm_dwnprocessenter can be used to trap the Enter key in a DataWindow control. Call SetActionCode ( 1 ) and return to suppress the default Enter action.

  • pbm_enchange: A user event corresponding to pbm_enchange can be used to trap changes to a SingleLineEdit control as the user is typing. It corresponds to the Windows EN_CHANGE event which indicates the user has taken an action that may have altered the text. It is triggered after Windows has updated the display but doesn’t wait until the user changes focus.

  • PBTrace: To get a trace of database activity use SQLCA.DBMS = "TRACE xxx" where xxx is ODBC, SYBASE, etc. Run your program, then look in c:\windows\pbtrace.log.

  • Regenerating PBCATCOL: To regenerate the PBCATCOL label and header values from scratch, run the PBC_FIX.SQL file contained in Pattern Matching With SQL.

  • Script Font: To change the font used by the Script Painter in PowerBuilder 5, open a script and then pick Design - Options - Font.

    To do the same in PowerBuilder 4, change these parameters in the [PB] section of c:\pb4\pb.ini:

    EditorTabWidth=3
    EditorFontHeight=8
    EditorFontName=Courier New
    EditorFontBold=0
    EditorFontFixed=1

  • Watcom Help: To have Watcom SQL 4.0 Help at your fingertips make a Program Manager icon for c:\wsql40\win\pbwat040.hlp. For Sybase SQL Anywhere 5.0 use c:\sqlany50\win\dbeng50w.hlp.

  • Wingdings: To create simple DataWindow graphics without resorting to bitmap pictures set the font for a string column to Wingdings. Then use the Windows Character Map accessory to copy and paste the character corresponding to the symbol you need. Hold down the left mouse button to force Character Map to magnify the current symbol. Change the column's font size and color to highlight the symbol.


Breck Carter can be reached by phone at (416) 763-5200 or via email at bcarter@bcarter.com.