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
http://smartoffice.com.au <<- just built. needs work
http://peakhour.com.au <<- corporate site
http://www.geocities.com/kimmie_scott <<- 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
magical.
String query = "select * from Agent"; // yeah yeah. go grab it.
Recordset rs = ADOSQL.executeQuery(query);
do {
curRow = new Agent(); // make a new one
curRow.getFromResultSet(rs);
vRows.addElement(curRow); // stuff it in
rs.moveNext();
} 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);
saResult.fromVariantArray(vArray);
Variant vResult = new Variant();
// And finally put 'em in and shovel 'em out.
vResult.putSafeArray(saResult);
// 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
Next
Set o = Nothing
%>



"Mike Meyer" <mikeme@netvision.net.il> wrote in message
news:379a2616@NEWS.DEVX.COM...
>
> Hi,
> If anybody out there has succeeded passing an array from COM component

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