Hi! Perhaps I am not using the right terms when I search but I am unable to find any posts on how to create a function that takes as a parameter a variable sized array of objects.
For example, I'd like to pass 10 objects into my function. Each object contains 3 fields (col1, col2, col3) with values
col1 col2 col3
--------------------------------
1 2 3
1 4 7
2 1 1
2 22 99
etc
I'd like to loop over this variable length "array" and insert these values into a table.
something like this:
INSERT INTO myTable (COL1,COL2,COL3) VALUES(Obj[i],Col1, Obj[i].Col2, Obj3[i].Col3);
I have no problem passing an array of let's say integers and loop over. But how do I pass an array of objects? Perhaps there is some sort of a jagged or multidimensional array available?
Then I need to call it from Java. So the solution must be accessible via jdbc.
Any ideas/linkies/samples are greatly appreciated.
Infinite thanks in advance,