call VRMethod "MLE_1", "Insert", "Had the Item in the RequestList method been 'Column_Names' then only the column names would have appeared in the above output. Similarly, if the item had been 'Data' then just the data rows would have appeared"||"0d"x
/* Clear the query buffer and add the SELECT statement to it */
call VRMethod "DDEC_1", "Poke", "Clear", "SELECT Surname, Studnum FROM Student"
call VRMethod "MLE_1", "Insert", "0d"x
call VRMethod "MLE_1", "Insert", "call VRMethod 'DDEC_1','Poke','Clear','SELECT Surname,Studnum FROM Student'"||"0d"x
call VRMethod "MLE_1", "Insert", "Notes: "
call VRMethod "MLE_1", "Insert", "The query buffer is cleared and the SELECT statement is added"||"0d"x||"0d"x
/* The query buffer will contain:
SELECT Surname, Studnum FROM Student WHERE Studnum < 86009
call VRMethod "MLE_1", "Insert", "The query buffer now contains:SELECT Surname, Studnum FROM Student WHERE Studnum < 86009 "||"0d"x||"0d"x
/* The ORDER BY clause is appended to the query buffer, and the data
from the query is placed on the clipboard. The Item could have been
Clip_Column_Names or Clip_Column_Names_And_Data
*/
call VRMethod "DDEC_1", "Poke", "Clip_Data", "ORDER BY Surname"
call VRMethod "MLE_1", "Insert", "call VRMethod 'DDEC_1','Poke','Clip_Data','ORDER BY Surname'"||"0d"x
call VRMethod "MLE_1", "Insert", "Notes:"
call VRMethod "MLE_1", "Insert", "The ORDER BY clause is appended to the query buffer, and the data form the query is placed on the clipboard. The item could also have been 'Clip_Column_Names' or 'Clip_Column_Names_And_Data' "||"0d"x
/* paste the contents of the clipboard onto the MLE */
call VRMethod "MLE_1", "Insert", "The connection to the database engine is terminated. The DDE conversation still exists, so another POKE Connect could be done"
/* Allow to Poke the Connect Command to do the example again */
call VRSet "PB_9", "Enabled", 1
/* set mouse pointer back to the arrow which is default */
call VRSet "SW_3", "Pointer", "<Default>"
call VRSet "PB_6", "Enabled", 0
return
/*:VRX PB_8_Click
*/
PB_8_Click:
call sw_3_close
return
/*:VRX PB_9_Click
*/
PB_9_Click:
call VRMethod "DDEC_1", "Poke", "CONNECT", ""
/* Do not allow the command to be executed again
until the sample has been run again
*/
call VRSet "PB_9", "Enabled", 0
/* Enable the sample to be executed again */
call VRSet "PB_6", "Enabled", 1
return
/*:VRX Quit
*/
Quit:
window = VRWindow()
call VRSet window, "Shutdown", 1
drop window
return
/*:VRX SW_1_Close
*/
SW_1_Close:
call SW_1_Fini
return
/*:VRX SW_1_Create
*/
SW_1_Create:
call SW_1_Init
return
/*:VRX SW_1_Fini
*/
SW_1_Fini:
window = VRInfo( "Window" )
call VRDestroy window
drop window
/* set the primary window visible */
call VRSet "Window1", "Visible", 1
return
/*:VRX SW_1_Init
*/
SW_1_Init:
ok = VRSet( "Window1", "Visible", 0 )
window = VRInfo( "Object" )
if( \VRIsChildOf( window, "Notebook" ) ) then do
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
end
drop window
/* create field for container: Service Name and Topic