I am writing a dataaccess layer in which am building my SQL statements
dynamically. Currently i am using the Oracle classes in
System.Data.OracleClient but executing muliple statements does not seem to
work. What i try to do is something like
INSERT INTO A (.. ) VALUES (:a ); SELECT * FROM A WHERE .. = :a; INSERT INTO
B ( ... ) VALUES (:a)
so I have one row in my dataset and want to split this row out into multiple
tables reading back the record in between to get the values that are updated
using triggers.
This is no problem using the SqlClient classes but the Oracle implementation
does not seem to support this. It seems to be a limitation in the Microsoft
implemetation. Did anyone try to get around this problem using anonymous
procedures?
So for instance
BEGIN
UPDATE A SET "a" = :a WHERE (a = :OriginalA);
SELECT * FROM A WHERE (a = :OriginalA);
END;
results in the following error "ORA-06550: ... :PLS-00428: In this
SELECT-statement an INTO-clausule must be used. ORA-06550: ... PL/SQL: SQL
Statement ignored.". Does anybody have a solution for this problem?
Has anyone tried using mulitple statements while making use of ODP.NET (or
alternatively with the DataDirect
Data Provider?)
Any help would be greately appreciated.
R. van Poelgeest (just remove the spaces to get my email address)
@ metaobjects.net