Replace tabs with spaces
This commit is contained in:
@@ -9,199 +9,199 @@ import com.jacob.com.Variant;
|
||||
*
|
||||
*/
|
||||
public class Command extends Dispatch {
|
||||
/**
|
||||
* standard constructor
|
||||
*/
|
||||
public Command() {
|
||||
super("ADODB.Command");
|
||||
}
|
||||
/**
|
||||
* standard constructor
|
||||
*/
|
||||
public Command() {
|
||||
super("ADODB.Command");
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*
|
||||
* @param dispatchTarget
|
||||
*/
|
||||
public Command(Dispatch dispatchTarget) {
|
||||
super(dispatchTarget);
|
||||
}
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*
|
||||
* @param dispatchTarget
|
||||
*/
|
||||
public Command(Dispatch dispatchTarget) {
|
||||
super(dispatchTarget);
|
||||
}
|
||||
|
||||
/**
|
||||
* runs the "Properties" command
|
||||
*
|
||||
* @return the properties
|
||||
*/
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
/**
|
||||
* runs the "Properties" command
|
||||
*
|
||||
* @return the properties
|
||||
*/
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
|
||||
/**
|
||||
* runs the "ActiveConnection" command
|
||||
*
|
||||
* @return a Connection object
|
||||
*/
|
||||
public Connection getActiveConnection() {
|
||||
return new Connection(Dispatch.get(this, "ActiveConnection")
|
||||
.toDispatch());
|
||||
}
|
||||
/**
|
||||
* runs the "ActiveConnection" command
|
||||
*
|
||||
* @return a Connection object
|
||||
*/
|
||||
public Connection getActiveConnection() {
|
||||
return new Connection(Dispatch.get(this, "ActiveConnection")
|
||||
.toDispatch());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the "ActiveConnection" object
|
||||
*
|
||||
* @param ppvObject
|
||||
* the new connection
|
||||
*/
|
||||
public void setActiveConnection(Connection ppvObject) {
|
||||
Dispatch.put(this, "ActiveConnection", ppvObject);
|
||||
}
|
||||
/**
|
||||
* Sets the "ActiveConnection" object
|
||||
*
|
||||
* @param ppvObject
|
||||
* the new connection
|
||||
*/
|
||||
public void setActiveConnection(Connection ppvObject) {
|
||||
Dispatch.put(this, "ActiveConnection", ppvObject);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the results from "CommandText"
|
||||
*/
|
||||
public String getCommandText() {
|
||||
return Dispatch.get(this, "CommandText").toString();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return the results from "CommandText"
|
||||
*/
|
||||
public String getCommandText() {
|
||||
return Dispatch.get(this, "CommandText").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pbstr
|
||||
* the new "CommandText"
|
||||
*/
|
||||
public void setCommandText(String pbstr) {
|
||||
Dispatch.put(this, "CommandText", pbstr);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param pbstr
|
||||
* the new "CommandText"
|
||||
*/
|
||||
public void setCommandText(String pbstr) {
|
||||
Dispatch.put(this, "CommandText", pbstr);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the results of "CommandTimeout"
|
||||
*/
|
||||
public int getCommandTimeout() {
|
||||
return Dispatch.get(this, "CommandTimeout").getInt();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return the results of "CommandTimeout"
|
||||
*/
|
||||
public int getCommandTimeout() {
|
||||
return Dispatch.get(this, "CommandTimeout").getInt();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plTimeout
|
||||
* the new "CommandTimeout"
|
||||
*/
|
||||
public void setCommandTimeout(int plTimeout) {
|
||||
Dispatch.put(this, "CommandTimeout", new Variant(plTimeout));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param plTimeout
|
||||
* the new "CommandTimeout"
|
||||
*/
|
||||
public void setCommandTimeout(int plTimeout) {
|
||||
Dispatch.put(this, "CommandTimeout", new Variant(plTimeout));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return results from "Prepared"
|
||||
*/
|
||||
public boolean getPrepared() {
|
||||
return Dispatch.get(this, "Prepared").getBoolean();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return results from "Prepared"
|
||||
*/
|
||||
public boolean getPrepared() {
|
||||
return Dispatch.get(this, "Prepared").getBoolean();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pfPrepared
|
||||
* the new value for "Prepared"
|
||||
*/
|
||||
public void setPrepared(boolean pfPrepared) {
|
||||
Dispatch.put(this, "Prepared", new Variant(pfPrepared));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param pfPrepared
|
||||
* the new value for "Prepared"
|
||||
*/
|
||||
public void setPrepared(boolean pfPrepared) {
|
||||
Dispatch.put(this, "Prepared", new Variant(pfPrepared));
|
||||
}
|
||||
|
||||
/**
|
||||
* "Execute"s a command
|
||||
*
|
||||
* @param RecordsAffected
|
||||
* @param Parameters
|
||||
* @param Options
|
||||
* @return
|
||||
*/
|
||||
public Recordset Execute(Variant RecordsAffected, Variant Parameters,
|
||||
int Options) {
|
||||
return (Recordset) Dispatch.call(this, "Execute", RecordsAffected,
|
||||
Parameters, new Variant(Options)).toDispatch();
|
||||
}
|
||||
/**
|
||||
* "Execute"s a command
|
||||
*
|
||||
* @param RecordsAffected
|
||||
* @param Parameters
|
||||
* @param Options
|
||||
* @return
|
||||
*/
|
||||
public Recordset Execute(Variant RecordsAffected, Variant Parameters,
|
||||
int Options) {
|
||||
return (Recordset) Dispatch.call(this, "Execute", RecordsAffected,
|
||||
Parameters, new Variant(Options)).toDispatch();
|
||||
}
|
||||
|
||||
/**
|
||||
* "Execute"s a command
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Recordset Execute() {
|
||||
Variant dummy = new Variant();
|
||||
return new Recordset(Dispatch.call(this, "Execute", dummy).toDispatch());
|
||||
}
|
||||
/**
|
||||
* "Execute"s a command
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Recordset Execute() {
|
||||
Variant dummy = new Variant();
|
||||
return new Recordset(Dispatch.call(this, "Execute", dummy).toDispatch());
|
||||
}
|
||||
|
||||
/**
|
||||
* creates a parameter
|
||||
*
|
||||
* @param Name
|
||||
* @param Type
|
||||
* @param Direction
|
||||
* @param Size
|
||||
* @param Value
|
||||
* @return
|
||||
*/
|
||||
public Variant CreateParameter(String Name, int Type, int Direction,
|
||||
int Size, Variant Value) {
|
||||
return Dispatch.call(this, "CreateParameter", Name, new Variant(Type),
|
||||
new Variant(Direction), new Variant(Size), Value);
|
||||
}
|
||||
/**
|
||||
* creates a parameter
|
||||
*
|
||||
* @param Name
|
||||
* @param Type
|
||||
* @param Direction
|
||||
* @param Size
|
||||
* @param Value
|
||||
* @return
|
||||
*/
|
||||
public Variant CreateParameter(String Name, int Type, int Direction,
|
||||
int Size, Variant Value) {
|
||||
return Dispatch.call(this, "CreateParameter", Name, new Variant(Type),
|
||||
new Variant(Direction), new Variant(Size), Value);
|
||||
}
|
||||
|
||||
// need to wrap Parameters
|
||||
/**
|
||||
* @return "Parameters"
|
||||
*/
|
||||
public Variant getParameters() {
|
||||
return Dispatch.get(this, "Parameters");
|
||||
}
|
||||
// need to wrap Parameters
|
||||
/**
|
||||
* @return "Parameters"
|
||||
*/
|
||||
public Variant getParameters() {
|
||||
return Dispatch.get(this, "Parameters");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plCmdType
|
||||
* new "CommandType"
|
||||
*/
|
||||
public void setCommandType(int plCmdType) {
|
||||
Dispatch.put(this, "CommandType", new Variant(plCmdType));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param plCmdType
|
||||
* new "CommandType"
|
||||
*/
|
||||
public void setCommandType(int plCmdType) {
|
||||
Dispatch.put(this, "CommandType", new Variant(plCmdType));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return current "CommandType"
|
||||
*/
|
||||
public int getCommandType() {
|
||||
return Dispatch.get(this, "CommandType").getInt();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return current "CommandType"
|
||||
*/
|
||||
public int getCommandType() {
|
||||
return Dispatch.get(this, "CommandType").getInt();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return "Name"
|
||||
*/
|
||||
public String getName() {
|
||||
return Dispatch.get(this, "Name").toString();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return "Name"
|
||||
*/
|
||||
public String getName() {
|
||||
return Dispatch.get(this, "Name").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pbstrName
|
||||
* new "Name"
|
||||
*/
|
||||
public void setName(String pbstrName) {
|
||||
Dispatch.put(this, "Name", pbstrName);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param pbstrName
|
||||
* new "Name"
|
||||
*/
|
||||
public void setName(String pbstrName) {
|
||||
Dispatch.put(this, "Name", pbstrName);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return curent "State"
|
||||
*/
|
||||
public int getState() {
|
||||
return Dispatch.get(this, "State").getInt();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return curent "State"
|
||||
*/
|
||||
public int getState() {
|
||||
return Dispatch.get(this, "State").getInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* cancel whatever it is we're doing
|
||||
*/
|
||||
public void Cancel() {
|
||||
Dispatch.call(this, "Cancel");
|
||||
}
|
||||
/**
|
||||
* cancel whatever it is we're doing
|
||||
*/
|
||||
public void Cancel() {
|
||||
Dispatch.call(this, "Cancel");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ package com.jacob.samples.ado;
|
||||
// Enum: CommandTypeEnum
|
||||
|
||||
public interface CommandTypeEnum {
|
||||
public static final int adCmdUnspecified = -1;
|
||||
public static final int adCmdUnknown = 8;
|
||||
public static final int adCmdText = 1;
|
||||
public static final int adCmdTable = 2;
|
||||
public static final int adCmdStoredProc = 4;
|
||||
public static final int adCmdFile = 256;
|
||||
public static final int adCmdTableDirect = 512;
|
||||
public static final int adCmdUnspecified = -1;
|
||||
public static final int adCmdUnknown = 8;
|
||||
public static final int adCmdText = 1;
|
||||
public static final int adCmdTable = 2;
|
||||
public static final int adCmdStoredProc = 4;
|
||||
public static final int adCmdFile = 256;
|
||||
public static final int adCmdTableDirect = 512;
|
||||
}
|
||||
|
||||
@@ -4,148 +4,148 @@ import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.Variant;
|
||||
|
||||
public class Connection extends Dispatch {
|
||||
public Connection() {
|
||||
super("ADODB.Connection");
|
||||
}
|
||||
public Connection() {
|
||||
super("ADODB.Connection");
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Connection(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Connection(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
// need to wrap Properties
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
// need to wrap Properties
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
|
||||
public String getConnectionString() {
|
||||
return Dispatch.get(this, "ConnectionString").toString();
|
||||
}
|
||||
public String getConnectionString() {
|
||||
return Dispatch.get(this, "ConnectionString").toString();
|
||||
}
|
||||
|
||||
public void setConnectionString(String pbstr) {
|
||||
Dispatch.put(this, "ConnectionString", pbstr);
|
||||
}
|
||||
public void setConnectionString(String pbstr) {
|
||||
Dispatch.put(this, "ConnectionString", pbstr);
|
||||
}
|
||||
|
||||
public int getCommandTimeout() {
|
||||
return Dispatch.get(this, "CommandTimeout").getInt();
|
||||
}
|
||||
public int getCommandTimeout() {
|
||||
return Dispatch.get(this, "CommandTimeout").getInt();
|
||||
}
|
||||
|
||||
public void setCommandTimeout(int plTimeout) {
|
||||
Dispatch.put(this, "CommandTimeout", new Variant(plTimeout));
|
||||
}
|
||||
public void setCommandTimeout(int plTimeout) {
|
||||
Dispatch.put(this, "CommandTimeout", new Variant(plTimeout));
|
||||
}
|
||||
|
||||
public int getConnectionTimeout() {
|
||||
return Dispatch.get(this, "ConnectionTimeout").getInt();
|
||||
}
|
||||
public int getConnectionTimeout() {
|
||||
return Dispatch.get(this, "ConnectionTimeout").getInt();
|
||||
}
|
||||
|
||||
public void setConnectionTimeout(int plTimeout) {
|
||||
Dispatch.put(this, "ConnectionTimeout", new Variant(plTimeout));
|
||||
}
|
||||
public void setConnectionTimeout(int plTimeout) {
|
||||
Dispatch.put(this, "ConnectionTimeout", new Variant(plTimeout));
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return Dispatch.get(this, "Version").toString();
|
||||
}
|
||||
public String getVersion() {
|
||||
return Dispatch.get(this, "Version").toString();
|
||||
}
|
||||
|
||||
public void Close() {
|
||||
Dispatch.call(this, "Close");
|
||||
}
|
||||
public void Close() {
|
||||
Dispatch.call(this, "Close");
|
||||
}
|
||||
|
||||
// how to deal with RecordsAffected being output?
|
||||
public Variant Execute(String CommandText, Variant RecordsAffected,
|
||||
int Options) {
|
||||
return Dispatch.call(this, CommandText, RecordsAffected, new Variant(
|
||||
Options));
|
||||
}
|
||||
// how to deal with RecordsAffected being output?
|
||||
public Variant Execute(String CommandText, Variant RecordsAffected,
|
||||
int Options) {
|
||||
return Dispatch.call(this, CommandText, RecordsAffected, new Variant(
|
||||
Options));
|
||||
}
|
||||
|
||||
public int BeginTrans() {
|
||||
return Dispatch.call(this, "BeginTrans").getInt();
|
||||
}
|
||||
public int BeginTrans() {
|
||||
return Dispatch.call(this, "BeginTrans").getInt();
|
||||
}
|
||||
|
||||
public void CommitTrans() {
|
||||
Dispatch.call(this, "CommitTrans");
|
||||
}
|
||||
public void CommitTrans() {
|
||||
Dispatch.call(this, "CommitTrans");
|
||||
}
|
||||
|
||||
public void RollbackTrans() {
|
||||
Dispatch.call(this, "RollbackTrans");
|
||||
}
|
||||
public void RollbackTrans() {
|
||||
Dispatch.call(this, "RollbackTrans");
|
||||
}
|
||||
|
||||
public void Open(String ConnectionString, String UserID, String Password,
|
||||
int Options) {
|
||||
Dispatch.call(this, "Open", ConnectionString, UserID, Password,
|
||||
new Variant(Options));
|
||||
}
|
||||
public void Open(String ConnectionString, String UserID, String Password,
|
||||
int Options) {
|
||||
Dispatch.call(this, "Open", ConnectionString, UserID, Password,
|
||||
new Variant(Options));
|
||||
}
|
||||
|
||||
public void Open() {
|
||||
Dispatch.call(this, "Open");
|
||||
}
|
||||
public void Open() {
|
||||
Dispatch.call(this, "Open");
|
||||
}
|
||||
|
||||
public Variant getErrors() {
|
||||
return Dispatch.get(this, "Errors");
|
||||
}
|
||||
public Variant getErrors() {
|
||||
return Dispatch.get(this, "Errors");
|
||||
}
|
||||
|
||||
public String getDefaultDatabase() {
|
||||
return Dispatch.get(this, "DefaultDatabase").toString();
|
||||
}
|
||||
public String getDefaultDatabase() {
|
||||
return Dispatch.get(this, "DefaultDatabase").toString();
|
||||
}
|
||||
|
||||
public void setDefaultDatabase(String pbstr) {
|
||||
Dispatch.put(this, "DefaultDatabase", pbstr);
|
||||
}
|
||||
public void setDefaultDatabase(String pbstr) {
|
||||
Dispatch.put(this, "DefaultDatabase", pbstr);
|
||||
}
|
||||
|
||||
public int getIsolationLevel() {
|
||||
return Dispatch.get(this, "IsolationLevel").getInt();
|
||||
}
|
||||
public int getIsolationLevel() {
|
||||
return Dispatch.get(this, "IsolationLevel").getInt();
|
||||
}
|
||||
|
||||
public void setIsolationLevel(int Level) {
|
||||
Dispatch.put(this, "IsolationLevel", new Variant(Level));
|
||||
}
|
||||
public void setIsolationLevel(int Level) {
|
||||
Dispatch.put(this, "IsolationLevel", new Variant(Level));
|
||||
}
|
||||
|
||||
public int getAttributes() {
|
||||
return Dispatch.get(this, "Attributes").getInt();
|
||||
}
|
||||
public int getAttributes() {
|
||||
return Dispatch.get(this, "Attributes").getInt();
|
||||
}
|
||||
|
||||
public void setAttributes(int plAttr) {
|
||||
Dispatch.put(this, "Attributes", new Variant(plAttr));
|
||||
}
|
||||
public void setAttributes(int plAttr) {
|
||||
Dispatch.put(this, "Attributes", new Variant(plAttr));
|
||||
}
|
||||
|
||||
public int getCursorLocation() {
|
||||
return Dispatch.get(this, "CursorLocation").getInt();
|
||||
}
|
||||
public int getCursorLocation() {
|
||||
return Dispatch.get(this, "CursorLocation").getInt();
|
||||
}
|
||||
|
||||
public void setCursorLocation(int plCursorLoc) {
|
||||
Dispatch.put(this, "CursorLocation", new Variant(plCursorLoc));
|
||||
}
|
||||
public void setCursorLocation(int plCursorLoc) {
|
||||
Dispatch.put(this, "CursorLocation", new Variant(plCursorLoc));
|
||||
}
|
||||
|
||||
public int getMode() {
|
||||
return Dispatch.get(this, "Mode").getInt();
|
||||
}
|
||||
public int getMode() {
|
||||
return Dispatch.get(this, "Mode").getInt();
|
||||
}
|
||||
|
||||
public void setMode(int plMode) {
|
||||
Dispatch.put(this, "Mode", new Variant(plMode));
|
||||
}
|
||||
public void setMode(int plMode) {
|
||||
Dispatch.put(this, "Mode", new Variant(plMode));
|
||||
}
|
||||
|
||||
public String getProvider() {
|
||||
return Dispatch.get(this, "Provider").toString();
|
||||
}
|
||||
public String getProvider() {
|
||||
return Dispatch.get(this, "Provider").toString();
|
||||
}
|
||||
|
||||
public void setProvider(String pbstr) {
|
||||
Dispatch.put(this, "Provider", pbstr);
|
||||
}
|
||||
public void setProvider(String pbstr) {
|
||||
Dispatch.put(this, "Provider", pbstr);
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return Dispatch.get(this, "State").getInt();
|
||||
}
|
||||
public int getState() {
|
||||
return Dispatch.get(this, "State").getInt();
|
||||
}
|
||||
|
||||
public Variant OpenSchema(int Schema, Variant Restrictions, Variant SchemaID) {
|
||||
return Dispatch.call(this, "OpenSchema", new Variant(Schema),
|
||||
Restrictions, SchemaID);
|
||||
}
|
||||
public Variant OpenSchema(int Schema, Variant Restrictions, Variant SchemaID) {
|
||||
return Dispatch.call(this, "OpenSchema", new Variant(Schema),
|
||||
Restrictions, SchemaID);
|
||||
}
|
||||
|
||||
public void Cancel() {
|
||||
Dispatch.call(this, "Cancel");
|
||||
}
|
||||
public void Cancel() {
|
||||
Dispatch.call(this, "Cancel");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,98 +4,98 @@ import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.Variant;
|
||||
|
||||
public class Field extends Dispatch {
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Field(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Field(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
|
||||
public int getActualSize() {
|
||||
return Dispatch.get(this, "ActualSize").getInt();
|
||||
}
|
||||
public int getActualSize() {
|
||||
return Dispatch.get(this, "ActualSize").getInt();
|
||||
}
|
||||
|
||||
public int getAttributes() {
|
||||
return Dispatch.get(this, "Attributes").getInt();
|
||||
}
|
||||
public int getAttributes() {
|
||||
return Dispatch.get(this, "Attributes").getInt();
|
||||
}
|
||||
|
||||
public int getDefinedSize() {
|
||||
return Dispatch.get(this, "DefinedSize").getInt();
|
||||
}
|
||||
public int getDefinedSize() {
|
||||
return Dispatch.get(this, "DefinedSize").getInt();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Dispatch.get(this, "Name").toString();
|
||||
}
|
||||
public String getName() {
|
||||
return Dispatch.get(this, "Name").toString();
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return Dispatch.get(this, "Type").getInt();
|
||||
}
|
||||
public int getType() {
|
||||
return Dispatch.get(this, "Type").getInt();
|
||||
}
|
||||
|
||||
public Variant getValue() {
|
||||
return Dispatch.get(this, "Value");
|
||||
}
|
||||
public Variant getValue() {
|
||||
return Dispatch.get(this, "Value");
|
||||
}
|
||||
|
||||
public void setValue(Variant pvar) {
|
||||
Dispatch.put(this, "Value", pvar);
|
||||
}
|
||||
public void setValue(Variant pvar) {
|
||||
Dispatch.put(this, "Value", pvar);
|
||||
}
|
||||
|
||||
public byte getPrecision() {
|
||||
return Dispatch.get(this, "Precision").getByte();
|
||||
}
|
||||
public byte getPrecision() {
|
||||
return Dispatch.get(this, "Precision").getByte();
|
||||
}
|
||||
|
||||
public byte getNumericScale() {
|
||||
return Dispatch.get(this, "NumericScale").getByte();
|
||||
}
|
||||
public byte getNumericScale() {
|
||||
return Dispatch.get(this, "NumericScale").getByte();
|
||||
}
|
||||
|
||||
public void AppendChunk(Variant Data) {
|
||||
Dispatch.call(this, "AppendChunk", Data);
|
||||
}
|
||||
public void AppendChunk(Variant Data) {
|
||||
Dispatch.call(this, "AppendChunk", Data);
|
||||
}
|
||||
|
||||
public Variant GetChunk(int Length) {
|
||||
return Dispatch.call(this, "GetChunk", new Variant(Length));
|
||||
}
|
||||
public Variant GetChunk(int Length) {
|
||||
return Dispatch.call(this, "GetChunk", new Variant(Length));
|
||||
}
|
||||
|
||||
public Variant getOriginalValue() {
|
||||
return Dispatch.get(this, "OriginalValue");
|
||||
}
|
||||
public Variant getOriginalValue() {
|
||||
return Dispatch.get(this, "OriginalValue");
|
||||
}
|
||||
|
||||
public Variant getUnderlyingValue() {
|
||||
return Dispatch.get(this, "UnderlyingValue");
|
||||
}
|
||||
public Variant getUnderlyingValue() {
|
||||
return Dispatch.get(this, "UnderlyingValue");
|
||||
}
|
||||
|
||||
public Variant getDataFormat() {
|
||||
return Dispatch.get(this, "DataFormat");
|
||||
}
|
||||
public Variant getDataFormat() {
|
||||
return Dispatch.get(this, "DataFormat");
|
||||
}
|
||||
|
||||
public void setDataFormat(Variant ppiDF) {
|
||||
Dispatch.put(this, "DataFormat", ppiDF);
|
||||
}
|
||||
public void setDataFormat(Variant ppiDF) {
|
||||
Dispatch.put(this, "DataFormat", ppiDF);
|
||||
}
|
||||
|
||||
public void setPrecision(byte pb) {
|
||||
Dispatch.put(this, "Precision", new Variant(pb));
|
||||
}
|
||||
public void setPrecision(byte pb) {
|
||||
Dispatch.put(this, "Precision", new Variant(pb));
|
||||
}
|
||||
|
||||
public void setNumericScale(byte pb) {
|
||||
Dispatch.put(this, "NumericScale", new Variant(pb));
|
||||
}
|
||||
public void setNumericScale(byte pb) {
|
||||
Dispatch.put(this, "NumericScale", new Variant(pb));
|
||||
}
|
||||
|
||||
public void setType(int pDataType) {
|
||||
Dispatch.put(this, "Type", new Variant(pDataType));
|
||||
}
|
||||
public void setType(int pDataType) {
|
||||
Dispatch.put(this, "Type", new Variant(pDataType));
|
||||
}
|
||||
|
||||
public void setDefinedSize(int pl) {
|
||||
Dispatch.put(this, "DefinedSize", new Variant(pl));
|
||||
}
|
||||
public void setDefinedSize(int pl) {
|
||||
Dispatch.put(this, "DefinedSize", new Variant(pl));
|
||||
}
|
||||
|
||||
public void setAttributes(int pl) {
|
||||
Dispatch.put(this, "Attributes", new Variant(pl));
|
||||
}
|
||||
public void setAttributes(int pl) {
|
||||
Dispatch.put(this, "Attributes", new Variant(pl));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,40 +4,40 @@ import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.Variant;
|
||||
|
||||
public class Fields extends Dispatch {
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Fields(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Fields(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return Dispatch.get(this, "Count").getInt();
|
||||
}
|
||||
public int getCount() {
|
||||
return Dispatch.get(this, "Count").getInt();
|
||||
}
|
||||
|
||||
public Variant _NewEnum() {
|
||||
return Dispatch.call(this, "_NewEnum");
|
||||
}
|
||||
public Variant _NewEnum() {
|
||||
return Dispatch.call(this, "_NewEnum");
|
||||
}
|
||||
|
||||
public void Refresh() {
|
||||
Dispatch.call(this, "Refresh");
|
||||
}
|
||||
public void Refresh() {
|
||||
Dispatch.call(this, "Refresh");
|
||||
}
|
||||
|
||||
public Field getItem(int Index) {
|
||||
return new Field(Dispatch.call(this, "Item", new Variant(Index))
|
||||
.toDispatch());
|
||||
}
|
||||
public Field getItem(int Index) {
|
||||
return new Field(Dispatch.call(this, "Item", new Variant(Index))
|
||||
.toDispatch());
|
||||
}
|
||||
|
||||
public void Append(String Name, int Type, int DefinedSize, int Attrib) {
|
||||
Dispatch.call(this, "Append", Name, new Variant(Type), new Variant(
|
||||
DefinedSize), new Variant(Attrib));
|
||||
}
|
||||
public void Append(String Name, int Type, int DefinedSize, int Attrib) {
|
||||
Dispatch.call(this, "Append", Name, new Variant(Type), new Variant(
|
||||
DefinedSize), new Variant(Attrib));
|
||||
}
|
||||
|
||||
public void Delete(Variant Index) {
|
||||
Dispatch.call(this, "Delete", Index);
|
||||
}
|
||||
public void Delete(Variant Index) {
|
||||
Dispatch.call(this, "Delete", Index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,339 +4,339 @@ import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.Variant;
|
||||
|
||||
public class Recordset extends Dispatch {
|
||||
public Recordset() {
|
||||
super("ADODB.Recordset");
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Recordset(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
|
||||
public int getAbsolutePosition() {
|
||||
return Dispatch.get(this, "AbsolutePosition").getInt();
|
||||
}
|
||||
|
||||
public void setAbsolutePosition(int pl) {
|
||||
Dispatch.put(this, "AbsolutePosition", new Variant(pl));
|
||||
}
|
||||
|
||||
public Connection getActiveConnection() {
|
||||
return new Connection(Dispatch.get(this, "ActiveConnection")
|
||||
.toDispatch());
|
||||
}
|
||||
|
||||
public void setActiveConnection(Connection ppvObject) {
|
||||
Dispatch.put(this, "ActiveConnection", ppvObject);
|
||||
}
|
||||
|
||||
public void setActiveConnection(Variant ppvObject) {
|
||||
Dispatch.put(this, "ActiveConnection", ppvObject);
|
||||
}
|
||||
|
||||
public boolean getBOF() {
|
||||
return Dispatch.get(this, "BOF").getBoolean();
|
||||
}
|
||||
|
||||
public Variant getBookmark() {
|
||||
return Dispatch.get(this, "Bookmark");
|
||||
}
|
||||
|
||||
public void setBookmark(Variant pvBookmark) {
|
||||
Dispatch.put(this, "Bookmark", pvBookmark);
|
||||
}
|
||||
|
||||
public int getCacheSize() {
|
||||
return Dispatch.get(this, "CacheSize").getInt();
|
||||
}
|
||||
|
||||
public void setCacheSize(int pl) {
|
||||
Dispatch.put(this, "CacheSize", new Variant(pl));
|
||||
}
|
||||
|
||||
public int getCursorType() {
|
||||
return Dispatch.get(this, "CursorType").getInt();
|
||||
}
|
||||
|
||||
public void setCursorType(int pl) {
|
||||
Dispatch.put(this, "CursorType", new Variant(pl));
|
||||
}
|
||||
|
||||
public boolean getEOF() {
|
||||
return Dispatch.get(this, "EOF").getBoolean();
|
||||
}
|
||||
|
||||
public Fields getFields() {
|
||||
return new Fields(Dispatch.get(this, "Fields").toDispatch());
|
||||
}
|
||||
|
||||
public int getLockType() {
|
||||
return Dispatch.get(this, "LockType").getInt();
|
||||
}
|
||||
|
||||
public void setLockType(int plLockType) {
|
||||
Dispatch.put(this, "LockType", new Variant(plLockType));
|
||||
}
|
||||
|
||||
public int getMaxRecords() {
|
||||
return Dispatch.get(this, "MaxRecords").getInt();
|
||||
}
|
||||
|
||||
public void setMaxRecords(int pl) {
|
||||
Dispatch.put(this, "MaxRecords", new Variant(pl));
|
||||
}
|
||||
|
||||
public int getRecordCount() {
|
||||
return Dispatch.get(this, "RecordCount").getInt();
|
||||
}
|
||||
|
||||
public void setSource(Object pvSource) {
|
||||
Dispatch.put(this, "Source", pvSource);
|
||||
}
|
||||
|
||||
public void setSource(String pvSource) {
|
||||
Dispatch.put(this, "Source", pvSource);
|
||||
}
|
||||
|
||||
public Variant getSource() {
|
||||
return Dispatch.get(this, "Source");
|
||||
}
|
||||
|
||||
public void AddNew(Variant FieldList, Variant Values) {
|
||||
Dispatch.call(this, "AddNew", FieldList, Values);
|
||||
}
|
||||
|
||||
public void CancelUpdate() {
|
||||
Dispatch.call(this, "CancelUpdate");
|
||||
}
|
||||
|
||||
public void Close() {
|
||||
Dispatch.call(this, "Close");
|
||||
}
|
||||
|
||||
public void Delete(int AffectRecords) {
|
||||
Dispatch.call(this, "Delete", new Variant(AffectRecords));
|
||||
}
|
||||
|
||||
public Variant GetRows(int Rows, Variant Start, Variant Fields) {
|
||||
return Dispatch.call(this, "GetRows", new Variant(Rows), Start, Fields);
|
||||
}
|
||||
|
||||
// get all rows
|
||||
public Variant GetRows() {
|
||||
return Dispatch.call(this, "GetRows");
|
||||
}
|
||||
|
||||
public void Move(int NumRecords, Variant Start) {
|
||||
Dispatch.call(this, "Move", new Variant(NumRecords), Start);
|
||||
}
|
||||
|
||||
public void MoveNext() {
|
||||
Dispatch.call(this, "MoveNext");
|
||||
}
|
||||
|
||||
public void MovePrevious() {
|
||||
Dispatch.call(this, "MovePrevious");
|
||||
}
|
||||
|
||||
public void MoveFirst() {
|
||||
Dispatch.call(this, "MoveFirst");
|
||||
}
|
||||
|
||||
public void MoveLast() {
|
||||
Dispatch.call(this, "MoveLast");
|
||||
}
|
||||
|
||||
public void Open(Variant Source, Variant ActiveConnection, int CursorType,
|
||||
int LockType, int Options) {
|
||||
Dispatch.call(this, "Open", Source, ActiveConnection, new Variant(
|
||||
CursorType), new Variant(LockType), new Variant(Options));
|
||||
}
|
||||
|
||||
public void Open(Variant Source, Variant ActiveConnection) {
|
||||
Dispatch.call(this, "Open", Source, ActiveConnection);
|
||||
}
|
||||
|
||||
public void Requery(int Options) {
|
||||
Dispatch.call(this, "Requery", new Variant(Options));
|
||||
}
|
||||
|
||||
public void Update(Variant Fields, Variant Values) {
|
||||
Dispatch.call(this, "Update", Fields, Values);
|
||||
}
|
||||
|
||||
public int getAbsolutePage() {
|
||||
return Dispatch.get(this, "AbsolutePage").getInt();
|
||||
}
|
||||
|
||||
public void setAbsolutePage(int pl) {
|
||||
Dispatch.put(this, "AbsolutePage", new Variant(pl));
|
||||
}
|
||||
|
||||
public int getEditMode() {
|
||||
return Dispatch.get(this, "EditMode").getInt();
|
||||
}
|
||||
|
||||
public Variant getFilter() {
|
||||
return Dispatch.get(this, "Filter");
|
||||
}
|
||||
|
||||
public void setFilter(Variant Criteria) {
|
||||
Dispatch.put(this, "Filter", Criteria);
|
||||
}
|
||||
|
||||
public int getPageCount() {
|
||||
return Dispatch.get(this, "PageCount").getInt();
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return Dispatch.get(this, "PageSize").getInt();
|
||||
}
|
||||
|
||||
public void setPageSize(int pl) {
|
||||
Dispatch.put(this, "PageSize", new Variant(pl));
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return Dispatch.get(this, "Sort").toString();
|
||||
}
|
||||
|
||||
public void setSort(String Criteria) {
|
||||
Dispatch.put(this, "Sort", Criteria);
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return Dispatch.get(this, "Status").getInt();
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return Dispatch.get(this, "State").getInt();
|
||||
}
|
||||
|
||||
public void UpdateBatch(int AffectRecords) {
|
||||
Dispatch.call(this, "UpdateBatch", new Variant(AffectRecords));
|
||||
}
|
||||
|
||||
public void CancelBatch(int AffectRecords) {
|
||||
Dispatch.call(this, "CancelBatch", new Variant(AffectRecords));
|
||||
}
|
||||
|
||||
public int getCursorLocation() {
|
||||
return Dispatch.get(this, "CursorLocation").getInt();
|
||||
}
|
||||
|
||||
public void setCursorLocation(int pl) {
|
||||
Dispatch.put(this, "CursorLocation", new Variant(pl));
|
||||
}
|
||||
|
||||
public Recordset NextRecordset(Variant RecordsAffected) {
|
||||
return new Recordset(Dispatch.call(this, "NextRecordset",
|
||||
RecordsAffected).toDispatch());
|
||||
}
|
||||
|
||||
public boolean Supports(int CursorOptions) {
|
||||
return Dispatch.call(this, "Supports", new Variant(CursorOptions))
|
||||
.getBoolean();
|
||||
}
|
||||
|
||||
public Variant getCollect(Variant Index) {
|
||||
return Dispatch.get(this, "Collect");
|
||||
}
|
||||
|
||||
public void setCollect(Variant Index, Variant pvar) {
|
||||
Dispatch.call(this, "Collect", Index, pvar);
|
||||
}
|
||||
|
||||
public int getMarshalOptions() {
|
||||
return Dispatch.get(this, "MarshalOptions").getInt();
|
||||
}
|
||||
|
||||
public void setMarshalOptions(int pl) {
|
||||
Dispatch.put(this, "MarshalOptions", new Variant(pl));
|
||||
}
|
||||
|
||||
public void Find(String Criteria, int SkipRecords, int SearchDirection,
|
||||
Variant Start) {
|
||||
Dispatch.call(this, "Find", Criteria, new Variant(SkipRecords),
|
||||
new Variant(SearchDirection), Start);
|
||||
}
|
||||
|
||||
public void Cancel() {
|
||||
Dispatch.call(this, "Cancel");
|
||||
}
|
||||
|
||||
public Variant getDataSource() {
|
||||
return Dispatch.get(this, "DataSource");
|
||||
}
|
||||
|
||||
public void setDataSource(Variant ppunkDataSource) {
|
||||
Dispatch.put(this, "DataSource", ppunkDataSource);
|
||||
}
|
||||
|
||||
public void Save(String FileName, int PersistFormat) {
|
||||
Dispatch.call(this, "Save", FileName, new Variant(PersistFormat));
|
||||
}
|
||||
|
||||
public Variant getActiveCommand() {
|
||||
return Dispatch.get(this, "ActiveCommand");
|
||||
}
|
||||
|
||||
public void setStayInSync(boolean pb) {
|
||||
Dispatch.put(this, "StayInSync", new Variant(pb));
|
||||
}
|
||||
|
||||
public boolean getStayInSync() {
|
||||
return Dispatch.get(this, "StayInSync").getBoolean();
|
||||
}
|
||||
|
||||
public String GetString(int StringFormat, int NumRows,
|
||||
String ColumnDelimeter, String RowDelimeter, String NullExpr) {
|
||||
return Dispatch.call(this, "GetString", new Variant(StringFormat),
|
||||
new Variant(NumRows), ColumnDelimeter, RowDelimeter, NullExpr)
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getDataMember() {
|
||||
return Dispatch.get(this, "DataMember").toString();
|
||||
}
|
||||
|
||||
public void setDataMember(String pl) {
|
||||
Dispatch.put(this, "DataMember", new Variant(pl));
|
||||
}
|
||||
|
||||
public int CompareBookmarks(Variant Bookmark1, Variant Bookmark2) {
|
||||
return Dispatch.call(this, "CompareBookmarks", Bookmark1, Bookmark2)
|
||||
.getInt();
|
||||
}
|
||||
|
||||
public Recordset Clone(int LockType) {
|
||||
return new Recordset(Dispatch
|
||||
.call(this, "Clone", new Variant(LockType)).toDispatch());
|
||||
}
|
||||
|
||||
public void Resync(int AffectRecords, int ResyncValues) {
|
||||
Dispatch.call(this, "Resync", new Variant(AffectRecords), new Variant(
|
||||
ResyncValues));
|
||||
}
|
||||
|
||||
public void Seek(Variant KeyValues, int SeekOption) {
|
||||
Dispatch.call(this, "Seek", KeyValues, new Variant(SeekOption));
|
||||
}
|
||||
|
||||
public void setIndex(String pl) {
|
||||
Dispatch.put(this, "Index", new Variant(pl));
|
||||
}
|
||||
|
||||
public String getIndex() {
|
||||
return Dispatch.get(this, "Index)").toString();
|
||||
}
|
||||
public Recordset() {
|
||||
super("ADODB.Recordset");
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is used instead of a case operation to turn a Dispatch
|
||||
* object into a wider object - it must exist in every wrapper class whose
|
||||
* instances may be returned from method calls wrapped in VT_DISPATCH
|
||||
* Variants.
|
||||
*/
|
||||
public Recordset(Dispatch d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public Variant getProperties() {
|
||||
return Dispatch.get(this, "Properties");
|
||||
}
|
||||
|
||||
public int getAbsolutePosition() {
|
||||
return Dispatch.get(this, "AbsolutePosition").getInt();
|
||||
}
|
||||
|
||||
public void setAbsolutePosition(int pl) {
|
||||
Dispatch.put(this, "AbsolutePosition", new Variant(pl));
|
||||
}
|
||||
|
||||
public Connection getActiveConnection() {
|
||||
return new Connection(Dispatch.get(this, "ActiveConnection")
|
||||
.toDispatch());
|
||||
}
|
||||
|
||||
public void setActiveConnection(Connection ppvObject) {
|
||||
Dispatch.put(this, "ActiveConnection", ppvObject);
|
||||
}
|
||||
|
||||
public void setActiveConnection(Variant ppvObject) {
|
||||
Dispatch.put(this, "ActiveConnection", ppvObject);
|
||||
}
|
||||
|
||||
public boolean getBOF() {
|
||||
return Dispatch.get(this, "BOF").getBoolean();
|
||||
}
|
||||
|
||||
public Variant getBookmark() {
|
||||
return Dispatch.get(this, "Bookmark");
|
||||
}
|
||||
|
||||
public void setBookmark(Variant pvBookmark) {
|
||||
Dispatch.put(this, "Bookmark", pvBookmark);
|
||||
}
|
||||
|
||||
public int getCacheSize() {
|
||||
return Dispatch.get(this, "CacheSize").getInt();
|
||||
}
|
||||
|
||||
public void setCacheSize(int pl) {
|
||||
Dispatch.put(this, "CacheSize", new Variant(pl));
|
||||
}
|
||||
|
||||
public int getCursorType() {
|
||||
return Dispatch.get(this, "CursorType").getInt();
|
||||
}
|
||||
|
||||
public void setCursorType(int pl) {
|
||||
Dispatch.put(this, "CursorType", new Variant(pl));
|
||||
}
|
||||
|
||||
public boolean getEOF() {
|
||||
return Dispatch.get(this, "EOF").getBoolean();
|
||||
}
|
||||
|
||||
public Fields getFields() {
|
||||
return new Fields(Dispatch.get(this, "Fields").toDispatch());
|
||||
}
|
||||
|
||||
public int getLockType() {
|
||||
return Dispatch.get(this, "LockType").getInt();
|
||||
}
|
||||
|
||||
public void setLockType(int plLockType) {
|
||||
Dispatch.put(this, "LockType", new Variant(plLockType));
|
||||
}
|
||||
|
||||
public int getMaxRecords() {
|
||||
return Dispatch.get(this, "MaxRecords").getInt();
|
||||
}
|
||||
|
||||
public void setMaxRecords(int pl) {
|
||||
Dispatch.put(this, "MaxRecords", new Variant(pl));
|
||||
}
|
||||
|
||||
public int getRecordCount() {
|
||||
return Dispatch.get(this, "RecordCount").getInt();
|
||||
}
|
||||
|
||||
public void setSource(Object pvSource) {
|
||||
Dispatch.put(this, "Source", pvSource);
|
||||
}
|
||||
|
||||
public void setSource(String pvSource) {
|
||||
Dispatch.put(this, "Source", pvSource);
|
||||
}
|
||||
|
||||
public Variant getSource() {
|
||||
return Dispatch.get(this, "Source");
|
||||
}
|
||||
|
||||
public void AddNew(Variant FieldList, Variant Values) {
|
||||
Dispatch.call(this, "AddNew", FieldList, Values);
|
||||
}
|
||||
|
||||
public void CancelUpdate() {
|
||||
Dispatch.call(this, "CancelUpdate");
|
||||
}
|
||||
|
||||
public void Close() {
|
||||
Dispatch.call(this, "Close");
|
||||
}
|
||||
|
||||
public void Delete(int AffectRecords) {
|
||||
Dispatch.call(this, "Delete", new Variant(AffectRecords));
|
||||
}
|
||||
|
||||
public Variant GetRows(int Rows, Variant Start, Variant Fields) {
|
||||
return Dispatch.call(this, "GetRows", new Variant(Rows), Start, Fields);
|
||||
}
|
||||
|
||||
// get all rows
|
||||
public Variant GetRows() {
|
||||
return Dispatch.call(this, "GetRows");
|
||||
}
|
||||
|
||||
public void Move(int NumRecords, Variant Start) {
|
||||
Dispatch.call(this, "Move", new Variant(NumRecords), Start);
|
||||
}
|
||||
|
||||
public void MoveNext() {
|
||||
Dispatch.call(this, "MoveNext");
|
||||
}
|
||||
|
||||
public void MovePrevious() {
|
||||
Dispatch.call(this, "MovePrevious");
|
||||
}
|
||||
|
||||
public void MoveFirst() {
|
||||
Dispatch.call(this, "MoveFirst");
|
||||
}
|
||||
|
||||
public void MoveLast() {
|
||||
Dispatch.call(this, "MoveLast");
|
||||
}
|
||||
|
||||
public void Open(Variant Source, Variant ActiveConnection, int CursorType,
|
||||
int LockType, int Options) {
|
||||
Dispatch.call(this, "Open", Source, ActiveConnection, new Variant(
|
||||
CursorType), new Variant(LockType), new Variant(Options));
|
||||
}
|
||||
|
||||
public void Open(Variant Source, Variant ActiveConnection) {
|
||||
Dispatch.call(this, "Open", Source, ActiveConnection);
|
||||
}
|
||||
|
||||
public void Requery(int Options) {
|
||||
Dispatch.call(this, "Requery", new Variant(Options));
|
||||
}
|
||||
|
||||
public void Update(Variant Fields, Variant Values) {
|
||||
Dispatch.call(this, "Update", Fields, Values);
|
||||
}
|
||||
|
||||
public int getAbsolutePage() {
|
||||
return Dispatch.get(this, "AbsolutePage").getInt();
|
||||
}
|
||||
|
||||
public void setAbsolutePage(int pl) {
|
||||
Dispatch.put(this, "AbsolutePage", new Variant(pl));
|
||||
}
|
||||
|
||||
public int getEditMode() {
|
||||
return Dispatch.get(this, "EditMode").getInt();
|
||||
}
|
||||
|
||||
public Variant getFilter() {
|
||||
return Dispatch.get(this, "Filter");
|
||||
}
|
||||
|
||||
public void setFilter(Variant Criteria) {
|
||||
Dispatch.put(this, "Filter", Criteria);
|
||||
}
|
||||
|
||||
public int getPageCount() {
|
||||
return Dispatch.get(this, "PageCount").getInt();
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return Dispatch.get(this, "PageSize").getInt();
|
||||
}
|
||||
|
||||
public void setPageSize(int pl) {
|
||||
Dispatch.put(this, "PageSize", new Variant(pl));
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return Dispatch.get(this, "Sort").toString();
|
||||
}
|
||||
|
||||
public void setSort(String Criteria) {
|
||||
Dispatch.put(this, "Sort", Criteria);
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return Dispatch.get(this, "Status").getInt();
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return Dispatch.get(this, "State").getInt();
|
||||
}
|
||||
|
||||
public void UpdateBatch(int AffectRecords) {
|
||||
Dispatch.call(this, "UpdateBatch", new Variant(AffectRecords));
|
||||
}
|
||||
|
||||
public void CancelBatch(int AffectRecords) {
|
||||
Dispatch.call(this, "CancelBatch", new Variant(AffectRecords));
|
||||
}
|
||||
|
||||
public int getCursorLocation() {
|
||||
return Dispatch.get(this, "CursorLocation").getInt();
|
||||
}
|
||||
|
||||
public void setCursorLocation(int pl) {
|
||||
Dispatch.put(this, "CursorLocation", new Variant(pl));
|
||||
}
|
||||
|
||||
public Recordset NextRecordset(Variant RecordsAffected) {
|
||||
return new Recordset(Dispatch.call(this, "NextRecordset",
|
||||
RecordsAffected).toDispatch());
|
||||
}
|
||||
|
||||
public boolean Supports(int CursorOptions) {
|
||||
return Dispatch.call(this, "Supports", new Variant(CursorOptions))
|
||||
.getBoolean();
|
||||
}
|
||||
|
||||
public Variant getCollect(Variant Index) {
|
||||
return Dispatch.get(this, "Collect");
|
||||
}
|
||||
|
||||
public void setCollect(Variant Index, Variant pvar) {
|
||||
Dispatch.call(this, "Collect", Index, pvar);
|
||||
}
|
||||
|
||||
public int getMarshalOptions() {
|
||||
return Dispatch.get(this, "MarshalOptions").getInt();
|
||||
}
|
||||
|
||||
public void setMarshalOptions(int pl) {
|
||||
Dispatch.put(this, "MarshalOptions", new Variant(pl));
|
||||
}
|
||||
|
||||
public void Find(String Criteria, int SkipRecords, int SearchDirection,
|
||||
Variant Start) {
|
||||
Dispatch.call(this, "Find", Criteria, new Variant(SkipRecords),
|
||||
new Variant(SearchDirection), Start);
|
||||
}
|
||||
|
||||
public void Cancel() {
|
||||
Dispatch.call(this, "Cancel");
|
||||
}
|
||||
|
||||
public Variant getDataSource() {
|
||||
return Dispatch.get(this, "DataSource");
|
||||
}
|
||||
|
||||
public void setDataSource(Variant ppunkDataSource) {
|
||||
Dispatch.put(this, "DataSource", ppunkDataSource);
|
||||
}
|
||||
|
||||
public void Save(String FileName, int PersistFormat) {
|
||||
Dispatch.call(this, "Save", FileName, new Variant(PersistFormat));
|
||||
}
|
||||
|
||||
public Variant getActiveCommand() {
|
||||
return Dispatch.get(this, "ActiveCommand");
|
||||
}
|
||||
|
||||
public void setStayInSync(boolean pb) {
|
||||
Dispatch.put(this, "StayInSync", new Variant(pb));
|
||||
}
|
||||
|
||||
public boolean getStayInSync() {
|
||||
return Dispatch.get(this, "StayInSync").getBoolean();
|
||||
}
|
||||
|
||||
public String GetString(int StringFormat, int NumRows,
|
||||
String ColumnDelimeter, String RowDelimeter, String NullExpr) {
|
||||
return Dispatch.call(this, "GetString", new Variant(StringFormat),
|
||||
new Variant(NumRows), ColumnDelimeter, RowDelimeter, NullExpr)
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getDataMember() {
|
||||
return Dispatch.get(this, "DataMember").toString();
|
||||
}
|
||||
|
||||
public void setDataMember(String pl) {
|
||||
Dispatch.put(this, "DataMember", new Variant(pl));
|
||||
}
|
||||
|
||||
public int CompareBookmarks(Variant Bookmark1, Variant Bookmark2) {
|
||||
return Dispatch.call(this, "CompareBookmarks", Bookmark1, Bookmark2)
|
||||
.getInt();
|
||||
}
|
||||
|
||||
public Recordset Clone(int LockType) {
|
||||
return new Recordset(Dispatch
|
||||
.call(this, "Clone", new Variant(LockType)).toDispatch());
|
||||
}
|
||||
|
||||
public void Resync(int AffectRecords, int ResyncValues) {
|
||||
Dispatch.call(this, "Resync", new Variant(AffectRecords), new Variant(
|
||||
ResyncValues));
|
||||
}
|
||||
|
||||
public void Seek(Variant KeyValues, int SeekOption) {
|
||||
Dispatch.call(this, "Seek", KeyValues, new Variant(SeekOption));
|
||||
}
|
||||
|
||||
public void setIndex(String pl) {
|
||||
Dispatch.put(this, "Index", new Variant(pl));
|
||||
}
|
||||
|
||||
public String getIndex() {
|
||||
return Dispatch.get(this, "Index)").toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,54 +3,54 @@ package com.jacob.samples.ado;
|
||||
import com.jacob.com.Variant;
|
||||
|
||||
public class test {
|
||||
public static void printRS(Recordset rs) {
|
||||
Fields fs = rs.getFields();
|
||||
public static void printRS(Recordset rs) {
|
||||
Fields fs = rs.getFields();
|
||||
|
||||
for (int i = 0; i < fs.getCount(); i++) {
|
||||
System.out.print(fs.getItem(i).getName() + " ");
|
||||
}
|
||||
System.out.println("");
|
||||
for (int i = 0; i < fs.getCount(); i++) {
|
||||
System.out.print(fs.getItem(i).getName() + " ");
|
||||
}
|
||||
System.out.println("");
|
||||
|
||||
rs.MoveFirst();
|
||||
while (!rs.getEOF()) {
|
||||
for (int i = 0; i < fs.getCount(); i++) {
|
||||
Field f = fs.getItem(i);
|
||||
Variant v = f.getValue();
|
||||
System.out.print(v + " ");
|
||||
}
|
||||
System.out.println("");
|
||||
rs.MoveNext();
|
||||
}
|
||||
}
|
||||
rs.MoveFirst();
|
||||
while (!rs.getEOF()) {
|
||||
for (int i = 0; i < fs.getCount(); i++) {
|
||||
Field f = fs.getItem(i);
|
||||
Variant v = f.getValue();
|
||||
System.out.print(v + " ");
|
||||
}
|
||||
System.out.println("");
|
||||
rs.MoveNext();
|
||||
}
|
||||
}
|
||||
|
||||
// open a recordset directly
|
||||
public static void getRS(String con, String query) {
|
||||
System.out.println("Recordset Open");
|
||||
Recordset rs = new Recordset();
|
||||
rs.Open(new Variant(query), new Variant(con));
|
||||
printRS(rs);
|
||||
}
|
||||
// open a recordset directly
|
||||
public static void getRS(String con, String query) {
|
||||
System.out.println("Recordset Open");
|
||||
Recordset rs = new Recordset();
|
||||
rs.Open(new Variant(query), new Variant(con));
|
||||
printRS(rs);
|
||||
}
|
||||
|
||||
// create connection and command objects and use them
|
||||
// to get a recordset
|
||||
public static void getCommand(String con, String query) {
|
||||
System.out.println("Command+Connection -> Recordset");
|
||||
Connection c = new Connection();
|
||||
c.setConnectionString(con);
|
||||
c.Open();
|
||||
Command comm = new Command();
|
||||
comm.setActiveConnection(c);
|
||||
comm.setCommandType(CommandTypeEnum.adCmdText);
|
||||
comm.setCommandText(query);
|
||||
Recordset rs = comm.Execute();
|
||||
printRS(rs);
|
||||
c.Close();
|
||||
}
|
||||
// create connection and command objects and use them
|
||||
// to get a recordset
|
||||
public static void getCommand(String con, String query) {
|
||||
System.out.println("Command+Connection -> Recordset");
|
||||
Connection c = new Connection();
|
||||
c.setConnectionString(con);
|
||||
c.Open();
|
||||
Command comm = new Command();
|
||||
comm.setActiveConnection(c);
|
||||
comm.setCommandType(CommandTypeEnum.adCmdText);
|
||||
comm.setCommandText(query);
|
||||
Recordset rs = comm.Execute();
|
||||
printRS(rs);
|
||||
c.Close();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String connectStr = "DRIVER=SQL Server;SERVER=DANADLER;UID=sa;PWD=;WSID=DANADLER;DATABASE=pubs";
|
||||
String queryStr = "select * from authors";
|
||||
getCommand(connectStr, queryStr);
|
||||
getRS(connectStr, queryStr);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
String connectStr = "DRIVER=SQL Server;SERVER=DANADLER;UID=sa;PWD=;WSID=DANADLER;DATABASE=pubs";
|
||||
String queryStr = "select * from authors";
|
||||
getCommand(connectStr, queryStr);
|
||||
getRS(connectStr, queryStr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user