using MS Sql server and VB i can execute two queries Insert and select in one statement e.g. (insert into (....) values (...) Select @@Identity).
how can i do the same thing using Oracle and VB. ???
It gives error. here's what i want to do.
(insert into table1 (...) values (...) Select table1_sequence.currval from dual )
what i want is insert a record and get the generated value in one statement. ADO supports compound statements.
when i write two sql commands in one string oracle gives error.. it works with sql server .
i have a trigger that inerts a value in column. i have to get the inserted value.
and i want to do it in one statement (compound statement). i am working in VB and using OLEDB.
insert into t1 () values() Select t1_seq.currval from dual
ADO can handle multiple recordsets but oracle give error when i execute two queries in one statement. if i put ' ; ' between queries it gives syntex error;