Yeah. It's a real drama trying to track down this isn't it? I trawled for
two weeks before some kind soul gave me a lift. There's a snippet of code
below. You should be able to get a picture from it.

Kimberley Scott
Senior Web Developer
Peakhour Pty Ltd <<- just built. needs work <<- corporate site <<- me

* Retrieve from the database for table "Agent"
public Variant retrieveAll() {
// Create a vector with all the row agents in it.
Vector vRows = new Vector();
Agent curRow; // This is just a class like an entity bean. Nothing
String query = "select * from Agent"; // yeah yeah. go grab it.
Recordset rs = ADOSQL.executeQuery(query);
do {
curRow = new Agent(); // make a new one
vRows.addElement(curRow); // stuff it in
} while (!rs.getEOF());
int vSize = vRows.size(); // get the size
// Now dump them into a Variant array. Weird isn't it.
Variant[] vArray = new Variant[vSize];
for (int i=0; i<vSize; i++) {
vArray[i] = new Variant();
vArray[i].putDispatch(vRows.elementAt(i)); // putDispatch? Hey I just
snagged it.
// Still more weirdness. Now put them into a SafeArray and return
SafeArray saResult = new SafeArray(Variant.VariantVariant, vSize);
Variant vResult = new Variant();
// And finally put 'em in and shovel 'em out.
// Gordon Bennett! Finally we can return it...
return vResult;

And "no" I don't normally comment my code this way... Well... Not all the
time. :-)

This can be used in this way:

Dim o, i
Set o = Server.CreateObject("Your.ProgID")
For Each i in o.retrieveAll()
'// your stuff here
Set o = Nothing

"Mike Meyer" <> wrote in message
> Hi,
> If anybody out there has succeeded passing an array from COM component

> in Java to VBScript, please drop me a line how did you do that or a code
> snippet.