home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / DGDEMO.ZIP / TGDEMO5.FRM (.txt) < prev    next >
Visual Basic Form  |  1993-08-04  |  3KB  |  79 lines

  1. Demo5
  2. Demo 5 - SQL
  3. Form15
  4. SQLCombo
  5. Command1
  6. Execute
  7. SQLStmt
  8. SELECT * FROM CUSTOMER
  9. Table1
  10. TgDemo
  11. MS Sans Serif
  12. Data1M
  13. Data1%
  14. dBASE IV;database=.
  15. CUSTOMER
  16. Customer Database
  17. ComboMsg
  18. Label1
  19. MS Sans Serif
  20.     Form_Load
  21. Form_Unload
  22. Cancel`
  23. QuitCurrentDemo/
  24. Command1_Click
  25. sqlerr
  26. Data1
  27. RecordSource
  28. SQLStmt
  29. TextU
  30.     LoadCombo
  31. Quote
  32.     ComboHelp
  33.     comboText
  34. helpText
  35. SQLCombo
  36. NewIndexB
  37. ComboHelp_Click
  38. SQLCombo_Change
  39. Caption
  40. ComboMsg
  41.     ListIndex
  42. SQLCombo_Click
  43. Form_Resize
  44.  This array keeps the list of "helpstrings" associated
  45.  with the default SQL statements in the combo.
  46. Command1_Click
  47.  Execute the SQL statement and trigger an error,
  48.  box if something goes wrong.d
  49. Error Executing SQL Statement
  50. Form_Load
  51.  Load up the combo box with some common SQL statements.
  52.  The second argument is a bit of "help" so it's a bits
  53.  easier to use the demo.
  54. * FROM CUSTOMER
  55. Chooses all records
  56. COMPANY FROM CUSTOMER
  57. Grid will show only one column
  58. LASTNAME, COMPANY FROM CUSTOMER
  59. Grid will show LASTNAME and COMPANY fields
  60. COUNT(*) FROM CUSTOMER
  61. Grid will display calculated result
  62. UCASE(LASTNAME) AS ULAST, UCASE(FIRSTNAME) AS UFIRST FROM CUSTOMER
  63. Grid will show aliased field names
  64. * FROM CUSTOMER WHERE FIRSTNAME = 
  65. Jerry
  66. Only some records will be shown
  67. * FROM CUSTOMER ORDER BY LASTNAME
  68. Records will be in LASTNAME order
  69. Form_Unload
  70. LoadCombo
  71.  Small subroutine to add items to the combo box,
  72.  and associate a help string by putting it into,
  73.  the ComboHelp array. 
  74. SQLCombo_Click
  75.  When an item is chosen from the SQL combo box,,
  76.  display the help message as well and put thex
  77.  SQL statement into the SQL editing area. 
  78. SELECT 
  79.