|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > Database > Requery |
Refreshes all the grids and the tree view by re-querying the database
call DBWShell("Requery")
After executing the command, check the value of the variable okDBW
TRUE |
the command succedeed |
|---|---|
FALSE |
otherwise |
Call this command after modifying the database from scripting language (i.e. after adding a record).
This command refreshes both the tables and the tree views in DBWorks.
NoRequery command
Sub main()
Set swApp = CreateObject ("SldWorks.Application")
cmdLine = "INSERT INTO DOCUMENT "
cmdLine = cmdLine & "(T,ID,DESCRIPTION,CREATED_BY,CREATION_DATE,COST) "
cmdLine = cmdLine & "VALUES "
cmdLine = cmdLine & "('0','TestProject','Description of test project','Ciro','1999/04/26',1500)"
DBWExecSQL( cmdLine )
if (okDBW = False) then exit sub
call DBWShell( "Wait" )
if (okDBW = False) then exit sub
call DBWShell( "Requery" )
if (okDBW = False) then exit sub
End Sub