Execute an SQL statement in a separate thread.


ASYNC Identifier String


The ASYNC command lets you execute an SQL statement in a separate thread. It is used in conjunction with the Wait For command to get the results.

You supply the SQL statement, which is any valid SQL statement, as a String. The Identifier you must supply for the async SQL statement is used in the Wait For command and is a case-insensitive gfxd identifier. An identifier must not be the same as any other identifier for an async statement on the current connection. You cannot reference a statement previously prepared and named by the gfxd Prepare command in this command.

gfxd creates a new thread in the current or designated connection to issue the SQL statement. The separate thread is closed once the statement completes.


gfxd(PEERCLIENT)> async aInsert 'insert into firsttable values (40,''Forty'')';
gfxd(PEERCLIENT)> insert into firsttable values (50,'Fifty');
1 row inserted/updated/deleted
gfxd(PEERCLIENT)> wait for aInsert;
1 row inserted/updated/deleted
-- the result of the asynchronous insert