Forum Discussion

nagitarami's avatar
nagitarami
Occasional Visitor
6 years ago

execute and edit a PL/SQL with extension file .SQL

good day dears:

 

I need to execute a plsql in testcomplete at run time and modify some parameters using the .sql archile It occurs to me to take several steps to create the procedures:

 

1.- Edit a text file with .sql extension to modify two more simple variables

2.-Find a way to execute the pl / sql directly by testcomplete or by means of a .sql file

3.-I do not expect to have a result since for another test case it will be validated if the changes generated by the plsql have been carried out successfully. I thank you very much for giving me ideas

 

example to extructure sql

--change inyection 
DECLARE
var_estado_act CHAR(1);

....setences . . . . .
var_nfolio NUMBER(12) := <here insert new F12>; --acá tienes que ingresar el F12
vMseId number;
-- commit;
CURSOR c1 IS
SELECT ... 
FROM ....
WHERE sentencess . . . 
and (( var_nvo_estado != variables_1 = var_estado_act )
sentences.. . . 
BEGIN


UPDATE f12hdref SET
 . . . .sentences

UPDATE f12dtlef SET
Commit;
END;

 

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    TestComplete does not provide any built-in means to execute SQL statements and uses ADO for this.

    With the ADO, however, it is not possible to execute multi-line SQL statements.

    Considering the above, if you really need to execute several dependent SQL statements, your only option is to use command-line tool provided by your SQL DBMS (sqlexec, etc.) and call this tool from TestComplete (either as Tested Application or via WshShell.Exec()).