Using following code create a Dex Procedure
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------{---------------------------------------------------------------
Auther : Rashid Farooq
Project : Haier Company
Company : Ovex Tech - Pakistan
Date Modified : 14 April 2009
----------------------------------------------------------------
Copyright (c) Ovex Technlogies (Pvt) Limited
----------------------------------------------------------------}
pragma(disable warning LiteralStringUsed);
in text txtQuery;
local text SQLStatement;
local long lngResult,
SQL_connection,
GPS_error_number,
SQL_error_number;
local string SQL_error_string,
ODBC_error_string;
try
lngResult = SQL_Connect(SQL_connection); {Connection to SQL Server}
if lngResult <> 0 then exit try; end if;
SQLStatement = "use " + 'Intercompany ID' of globals; {Crating SQL statement to change the Database}
lngResult = SQL_Execute(SQL_connection,SQLStatement); {Executing SQL Statements}
if lngResult <> 0 then exit try; end if;
SQLStatement=txtQuery; {Passed Query}
lngResult = SQL_Execute(SQL_connection,SQLStatement); {Executing SQL Statements}
if lngResult <> 0 then exit try; end if;
else
error "Unable to retrieve SQL error information.";
end try;
if lngResult <> 0 and lngResult <> 31 then
lngResult = SQL_GetError(SQL_connection,GPS_error_number, SQL_error_number,SQL_error_string, ODBC_error_string);
if lngResult = 0 then
warning "GPS Error: " + str(GPS_error_number) + char(13) +
"SQL Error: " + str(SQL_error_number) + " " + SQL_error_string + char(13) {+
"ODBC Error: " + ODBC_error_string};
else
error "Unable to retrieve SQL error information.";
end if;
end if;
lngResult = SQL_Terminate(SQL_connection);
pragma(enable warning LiteralStringUsed);
{---------------------------------------------------------------
End Of Script
----------------------------------------------------------------}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now, call ExecuteQuery,"DELETE TABLE1 WHERE PERSON = "ABC";
Now, call ExecuteQuery,"DELETE TABLE2 WHERE PERSON = "ABC";