home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
QBAS
/
TG_DEMO.ZIP
/
TGDEMO5.FRM
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1993-08-04
|
3KB
|
79 lines
Demo5
Demo 5 - SQL
Form15
SQLCombo
Command1
Execute
SQLStmt
SELECT * FROM CUSTOMER
Table1
TgDemo
MS Sans Serif
Data1M
Data1%
dBASE IV;database=.
CUSTOMER
Customer Database
ComboMsg
Label1
MS Sans Serif
Form_Load
Form_Unload
Cancel`
QuitCurrentDemo/
Command1_Click
sqlerr
Data1
RecordSource
SQLStmt
TextU
LoadCombo
Quote
ComboHelp
comboText
helpText
SQLCombo
NewIndexB
ComboHelp_Click
SQLCombo_Change
Caption
ComboMsg
ListIndex
SQLCombo_Click
Form_Resize
This array keeps the list of "helpstrings" associated
with the default SQL statements in the combo.
Command1_Click
Execute the SQL statement and trigger an error,
box if something goes wrong.d
Error Executing SQL Statement
Form_Load
Load up the combo box with some common SQL statements.
The second argument is a bit of "help" so it's a bits
easier to use the demo.
* FROM CUSTOMER
Chooses all records
COMPANY FROM CUSTOMER
Grid will show only one column
LASTNAME, COMPANY FROM CUSTOMER
Grid will show LASTNAME and COMPANY fields
COUNT(*) FROM CUSTOMER
Grid will display calculated result
UCASE(LASTNAME) AS ULAST, UCASE(FIRSTNAME) AS UFIRST FROM CUSTOMER
Grid will show aliased field names
* FROM CUSTOMER WHERE FIRSTNAME =
Jerry
Only some records will be shown
* FROM CUSTOMER ORDER BY LASTNAME
Records will be in LASTNAME order
Form_Unload
LoadCombo
Small subroutine to add items to the combo box,
and associate a help string by putting it into,
the ComboHelp array.
SQLCombo_Click
When an item is chosen from the SQL combo box,,
display the help message as well and put thex
SQL statement into the SQL editing area.
SELECT