Here are the examples of the java api com.jacob.com.Variant.putInt() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
17
Source : Access.java
with GNU Lesser General Public License v2.1
from freemansoft
with GNU Lesser General Public License v2.1
from freemansoft
/**
* gets the columns form the rec set
*
* @param recset
* @return list of column names
*/
public static String[] getColumns(Dispatch recset) {
Dispatch flds = Dispatch.get(recset, "Fields").toDispatch();
int n_flds = Dispatch.get(flds, "Count").getInt();
String[] s = new String[n_flds];
Variant vi = new Variant();
for (int i = 0; i < n_flds; i++) {
vi.putInt(i);
// must use the invoke method because this is a method call
// that wants to have a Dispatch.Get flag...
Dispatch fld = Dispatch.invoke(recset, "Fields", Dispatch.Get, new Object[] { vi }, new int[1]).toDispatch();
Variant name = Dispatch.get(fld, "Name");
s[i] = name.toString();
}
return s;
}