batching up commands

batching up commands

Postby kevinherring » Mon 20 Mar 2006 16:19

hi
I have various hierachical table structures in my database, that I retrieve to my program.
I have written a generic procedure that (when given the primary key of the top table) recursively works its way down the tree structure (by querying each table to find out which foreign keys reference it), querying the database for each table and bringing it back into a table of its own in my dataset.

It all works well, but I would like to make sure I am doing it the most efficient way. Sometimes I do 20 database queries in quick succession, so I was wondering if it was possible to batch up the oraclecommands and then call them all at once at the end, building the dataset in one hit.

I know with sqlcommand you can batch up commands using a ';' between statements. However, I dont think this works for returning data, just inserting and updating, and oracle doesnt like it when i try with a ';'.

Anyone any suggestions?
kevinherring
 
Posts: 64
Joined: Wed 04 Jan 2006 15:32

Postby Alexey » Tue 21 Mar 2006 10:58

Any kind of commands combining in Oracle is impossible. You can use either PL/SQL blocks or execute command with DML array parameters. For more information read the documentation for Oracle server and OraDirect .NET.
If you still have questions concerning OraDirect .NET, specify your question.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle