I'm a newbie to Java/J++ and I'm writing a data access wrapper to
encapsulate ADO functionality. I have a function
that takes a SQL statement and returns a two dimenisional variant array
representing the SQL resultset. I am trying to
use the ADO.Recordset.getRows() function and it seems to work.
The problem is, how the heck to I get the information out of the Variant
object I have created? In VB I just used the
variant array like such: target = vArray(2,1) but I can't figure out how
to do this in J++.
Here is what my code looks like...
file://Private member variables
private Variant mvRecords = null;
public Variant getVariantArrayFromSQL(String sSQL)
Recordset rst = new Recordset();
Connection con = new Connection();
mvRecords = rst.getRows();
...again, this function seems to work (I get no errors and the array seems
to be returned correctly to the calling client) but I can't figure out how
the mvRecords object to get the data out of it!!! There are a bunch of
methods like .getBoolean and .getInteger but they're not working for me and
find anything in the help or on MSDN that shows me how to use this object.
Any help would be much appreciated.