您正在查看: asp 分类下的文章

Recordset (ADO/WFC 语法)

Recordset (ADO/WFC 语法)

包 com.ms.wfc.data

构造函数

publicRecordset()
public Recordset(Object r)

方法

public void addNew(Object[] fieldList, Object[] valueList)
public void addNew(Object[] valueList)
public void addNew()

public void cancel()

public void cancelBatch(int affectRecords)
public void cancelBatch()

public void cancelUpdate()

public Object clone()
public Object clone(int lockType)

public void close()

public int compareBookmarks(Object bookmark1, Object bookmark2)

public void delete(int affectRecords)
public void delete()

public void find(String criteria)
public void find(String criteria, int SkipRecords)
public void find(String criteria, int SkipRecords, int searchDirection)
public void find(String criteria, int SkipRecords, int searchDirection, Object bmkStart)

public Object[][] getRows(int Rows, Object bmkStart, Object[] fieldList)

public void move(int numRecords)
public void move(int numRecords, Object bmkStart)

public void moveFirst()
public void moveLast()
public void moveNext()
public void movePrevious()

public Recordset nextRecordset()
public Recordset nextRecordset(int[] recordsAffected)

public void open()
public void open(Object source)
public void open(Object source, Object activeConnection)
public void open(Object source, Object activeConnection, int cursorType)
public void open(Object source, Object activeConnection, int cursorType,
int lockType)
public void open(Object source, Object activeConnection, int cursorType,
int lockType, int options)

public void requery()
public void requery(int options)

public void resync()
public void resync(int affectRecords, int resyncValues)

public void save(String fileName)
public void save(String fileName, int persistFormat)

public boolean supports(int cursorOptions)

public void update()
public void update(Object[] valueList)
public void update(Object[] fieldList, Object[] valueList)

public void updateBatch()
public void updateBatch(int affectRecords)

属性

public int getAbsolutePage()
public void setAbsolutePage(int page)

public int getAbsolutePosition()
public void setAbsolutePosition(int pos)

public Command getActiveCommand()

public Connection getActiveConnection()
public void setActiveConnection(String conn)
public void setActiveConnection(com.ms.wfc.data.Connection c)

public boolean getBOF()

public boolean getEOF()

public Object getBookmark()
public void setBookmark(Object bmk)

public int getCacheSize()
public void setCacheSize(int size)

public int getCursorLocation()
public void setCursorLocation(int cursorLoc)

public int getCursorType()
public void setCursorType(int cursorType)

public String getDataMember()
public void setDataMember(String pbstrDataMember)

public Iunknown getDataSource()
public void setDataSource(IUnknown dataSource)

public int getEditMode()

public Object getFilter()
public void setFilter(Object filter)

public int getLockType()
public void setLockType(int lockType)

public int getMarshalOptions()
public void setMarshalOptions(int options)

public int getMaxRecords()
public void setMaxRecords(int maxRecords)

public int getPageCount()

public int getPageSize()
public void setPageSize(int pageSize)

public int getRecordCount()

public String getSort()
public void setSort(String criteria)

public String getSource()
public void setSource(String query)
public void setSource(com.ms.wfc.data.Command command)

public int getState()

public int getStatus()

public boolean getStayInSync()
public void setStayInSync(boolean pbStayInSync)

public com.ms.wfc.data.FieldgetField(int n)
public com.ms.wfc.data.Field getField(String n)

public com.ms.wfc.data.Fields getFields()

public AdoProperties getProperties()

事件

有关 ADO/WFC 事件的详细信息,请参阅ADO/WFC 中的 ADO 事件.

public void addOnEndOfRecordset(RecordsetEventHandler handler)
public void removeOnEndOfRecordset(RecordsetEventHandler handler)

public void addOnFetchComplete(RecordsetEventHandler handler)
public void removeOnFetchComplete(RecordsetEventHandler handler)

public void addOnFetchProgress(RecordsetEventHandler handler)
public void removeOnFetchProgress(RecordsetEventHandler handler)

public void addOnFieldChangeComplete(RecordsetEventHandler handler)
public void removeOnFieldChangeComplete(RecordsetEventHandler handler)

public void addOnMoveComplete(RecordsetEventHandler handler)
public void removeOnMoveComplete(RecordsetEventHandler handler)

public void addOnRecordChangeComplete(RecordsetEventHandler handler)
public void removeOnRecordChangeComplete(RecordsetEventHandler handler)

public void addOnRecordsetChangeComplete(RecordsetEventHandler handler)
public void removeOnRecordsetChangeComplete(RecordsetEventHandler handler)

public void addOnWillChangeField(RecordsetEventHandler handler)
public void removeOnWillChangeField(RecordsetEventHandler handler)

public void addOnWillChangeRecord(RecordsetEventHandler handler)
public void removeOnWillChangeRecord(RecordsetEventHandler handler)

public void addOnWillChangeRecordset(RecordsetEventHandler handler)
public void removeOnWillChangeRecordset(RecordsetEventHandler handler)

public void addOnWillMove(RecordsetEventHandler handler)
public void removeOnWillMove(RecordsetEventHandler handler)

Command (ADO/WFC 语法)

Command (ADO/WFC 语法)

包 com.ms.wfc.data

构造函数

publicCommand()
public Command(String commandtext)

方法

public void cancel()

public com.ms.wfc.data.Parameter createParameter(String Name, int Type, int Direction, int Size, Object Value)

public Recordset execute()
public Recordset execute(Object[] parameters)
public Recordset execute(Object[] parameters, int options)

public int executeUpdate(Object[] parameters)
public int executeUpdate(Object[] parameters, int options)
public int executeUpdate()

属性

public com.ms.wfc.data.Connection getActiveConnection()
public void setActiveConnection(com.ms.wfc.data.Connection con)
public void setActiveConnection(String conString)

public String getCommandText()
public void setCommandText(String command)

public int getCommandTimeout()
public void setCommandTimeout(int timeout)

public int getCommandType()
public void setCommandType(int type)

public String getName()
public void setName(String name)

public boolean getPrepared()
public void setPrepared(boolean prepared)

public int getState()

public com.ms.wfc.data.ParametergetParameter(int n)
public com.ms.wfc.data.Parameter getParameter(String n)

public com.ms.wfc.data.Parameters getParameters()

public AdoProperties getProperties()

Field (ADO/WFC Syntax)

Field (ADO/WFC 语法)

包 com.ms.wfc.data

方法

public void appendChunk(byte[] bytes)
public void appendChunk(char[] chars)
public void appendChunk(String chars)

public byte[] getByteChunk(int len)
public char[] getCharChunk(int len)
public String getStringChunk(int len)

属性

public int getActualSize()

public int getAttributes()
public void setAttributes(int pl)

public com.ms.com.IUnknown getDataFormat()
public void setDataFormat(com.ms.com.IUnknown format)
(For more information, see the Microsoft Visual J++ WFC Reference documentation for the com.ms.wfc.data.IDataFormat interface.)

public int getDefinedSize()
public void setDefinedSize(int pl)

public String getName()

public int getNumericScale()
public void setNumericScale(byte pbNumericScale)

public Variant getOriginalValue()

public int getPrecision()
public void setPrecision(byte pbPrecision)

public int getType()
public void setType(int pDataType)

public Variant getUnderlyingValue()

public Variant getValue()
public void setValue(Variant value)

public AdoProperties getProperties()

Field Accessor Methods

Field 对象的 Value 属性可获得或设置该对象的内容。内容以变体型表示可被指定值和任何数据类型的对象类型。

ADO/WFC 使用 getValue 方法和 setValue 方法实现 Value 属性,前者返回变体型对象,后者则把变体型视为参数。虽然在某些语言(如 Microsoft Visual Basic) 中变体型的效率已经很高。但仍可以在 Microsoft Visual J++ 中通过使用本地 Java 数据类型获得更高的性能。

Value 属性外,ADO/WFC 还提供使用 Java 数据类型获得并设置 Field 对象内容的 accessor 方法。大多数这些方法都具有名称,其形式为 GetDataType 或 SetDataType。

有两点例外须加以注意。getObject 方法之一可返回强制为指定类的对象;不存在 getNull 属性。但 isNull 属性是存在的,它返回的布尔值可指明字段是否为空。

public native boolean getBoolean();
public void setBoolean(boolean v)

public native byte getByte();
public void setByte(byte v)

public native byte[] getBytes();
public void setBytes(byte[] v)

public native double getDouble();
public void setDouble(double v)

public native float getFloat();
public void setFloat(float v)

public native int getInt();
public void setInt(int v)

public native long getLong();
public void setLong(long v)

public native short getShort();
public void setShort(short v)

public native String getString();
public void setString(String v)

public native boolean isNull();
public void setNull()

public Object getObject()
public Object getObject(Class c)
public void setObject(Object value)

语法索引 (ADO for VC++)

语法索引 (ADO for vc++)

“ADO 语言参考”使用 Microsoft® Visual Basic® 编程语言来演示说明 ADO 方法和属性语法。该索引是对基于 Microsoft® Visual C++® 的“ADO 语言参考”的交叉引用。

如果在应用程序中使用 #import 伪指令,将生成头文件以便用户能够使用与 Microsoft Visual Basic 相类似的语法。可以将形式为 get_PropertyName 和 put_PropertyName 的属性名称当作类似 PropertyName 的简单声明进行处理,此后便可将属性看作数据成员而非函数。

所有方法、属性和事件都是返回 HRESULT 的函数,可对它们进行测试以确定函数执行的成功与否。

为下列元素列出方法和属性的语法

  • Collections
  • Command 对象
  • Connection 对象
  • Error 对象
  • Field 对象
  • Parameter 对象
  • Recordset 对象

Collections (ADO/WFC 语法)

Collections (ADO/WFC 语法)

包 com.ms.wfc.data

Parameters

方法

public void append(com.ms.wfc.data.Parameter param)

public void delete(int n)
public void delete(String s)

public void refresh()

public Parameter getItem(int n)
public Parameter getItem(String s)

属性

public int getCount()

Fields

方法

public void append(String name, int type)
public void append(String name, int type, int definedSize)
public void append(String name, int type, int definedSize, int attrib)

public void delete(int n)
public void delete(String s)

public void refresh()

public com.ms.wfc.data.Field getItem(int n)
public com.ms.wfc.data.Field getItem(String s)

属性

public int getCount()

Errors

方法

public void clear()

public void refresh()

public com.ms.wfc.data.Error getItem(int n)
public com.ms.wfc.data.Error getItem(String s)

属性

public int getCount()