Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Is it possible to pass an object to an Oracle Stored Procedure?

Is it possible to pass an object to an Oracle Stored Procedure?

From: Keith L. Norris <kln_at_gate.net>
Date: 2000/06/13
Message-ID: <3946BCC8.4137C518@gate.net>#1/1

I create an object of a custom class I created in VBA code in an MS Access97 front-end. The properties of that class are populated with data from database tables. There are quite a few properties in the class. When the user wants to insert a record, s/he fills in all the fields/properties and then chooses a save option which in actuality inserts four records in a table. Currently, the MS Access app handles the inserting of records. An MS Access sub procedure essentually contains a loop iterating four times that executes a dynamic INSERT statement created on-the-fly during each iteration of the loop. This is all done in MS Access SQL. Something like:

    Insert into tablename (field1, field2, field3) Values(object.property1, object.property2, object.property3);

This is only an example (a subset of the fields/properties). There are really alot more fields/properties. I was thinking to increase efficiency, it would be good if I passed the properties to a stored procedure in Oracle which executes the code necessary to do all the inserts. The problem is there are about 25 properties that would need to be passed to the stored procedure. I would hate to have to pass each property seperately to the stored procedure. Is there a way to pass the entire object to a stored procedure and have that procedure break down the various properties? I would think not, but I hope so. Please tell me I'm wrong. Is there anything else I could do to accomplish the same effect? Can arrays be passed in to a stored procedure? Any alternative suggestions?

Thank you very much,
Keith Received on Tue Jun 13 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US