VBScriptさんま屋.

VBScriptの個人的なメモです (´・ω・`)

ADOとADOXのオブジェクト

概要

ADOとADOXはデータベースの操作に使われる。
ADODB.Sreamオブジェクトだけは毛色が違って、テキストファイルやバイナリファイルの読み書きに使われる。

ADOのオブジェクト

ADOのオブジェクトは以下のように作成できる。

Dim cnn
Set cnn = CreateObject("ADODB.Connection")

オブジェクト プロパティ メソッド
Command ActiveConnection
CommandText
CommandTimeout
CommandType
Name
Parameters
Prepared
Properties
State
Cancel
CreateParameter
Execute
Connection Attributes
CommandTimeout
ConnectionString
ConnectionTimeout
CursorLocation
DefaultDatabase
Errors
IsolationLevel
Mode
Properties
Provider
State
Version
BeginTrans
CommitTrans
RollbackTrans
Cancel
Close
Execute
Open
OpenSchema
Error Description
HelpContext
HelpFile
NativeError
Number
Source
SQLState
Field ActualSize
Attributes
DefinedSize
Name
NumericScale
OriginalValue
Precision
Properties
Status
Type
UnderlyingValue
Value
AppendChunk
GetChunk
Parameter Attributes
Direction
Name
NumericScale
Precision
Properties
Size
Type
Value
AppendChunk
GetChunk
Property Attributes
Name
Type
Value
Record ActiveConnection
Fields
Mode
ParentURL
Properties
RecordType
Source
State
Cancel
Close
CopyRecord
DeleteRecord
GetChildren
MoveRecord
Open
Recordset AbusolutePage
AbsolutePosition
ActiveCommand
ActiveConnection
BOF
EOF
Bookmark
CacheSize
CursorLocation
CursorType
DataMember
DataSource
EditMode
Fields
Filter
Index
LockType
MarshalOptions
MaxRecords
PageCount
PageSize
Properties
RecordCount
Sort
Source
State
Status
StayInSync
AddNew
Cancel
CancelBatch
CancelUpdate
Clone
Close
CompareBookmarks
Delete
Find
GetRows
GetString
Move
MoveFirst
MoveLast
MovePrevious
NextRecordset
Open
Requery
ReSync
Save
Seek
Supports
Update
UpdataBatch
Stream CharSet
EOS
LineSeparator
Mode
Position
Size
State
Type
Cancel
Close
CopyTo
Flush
LoadFromFile
Open
Read
ReadText
SaveToFile
SetEOS
SkipLine
Stat
Write
WriteText

ADOのコレクション

コレクション プロパティ メソッド
Errors Count
Item
Clear
Refresh
Fields Count
Item
Append
CancelUpdate
Delete
Refresh
Resync
Update
Parameters Count
Item
Append
Delete
Refresh
Properties Count
Item
Refresh

ADOXのオブジェクト

ADOXのオブジェクトは以下のように作成できる。

Dim cat
Set cat = CreateObject("ADOX.Catalog")

オブジェクト プロパティ メソッド
Catalog ActiveConnection
Tables
Users
Groups
Procedures
Create
GetObjectOwner
SetObjectOwner
Column Name
Type
Attributes
DefinedSize
NumeriScale
Precision
ParentCatalog
RelatedColumn
SortOrder
Properties
Group Name
Users
Properties
GetPermission
SetPermission
Index Name
Columns
Unique
PrimaryKeys
IndexNulls
Clustered
Properties
Key Name
Type
Columns
RelatedTable
DeleteRule
UpdateRule
Procedure Name
Command
DateCreated
DateModified
Table Name
Type
Columns
Indexes
Keys
ParentCatalog
DateCreated
DateModified
Properties
User Name
Groups
Properties
ChangePassword
GetPermission
SetPermission
View Name
Command
DateCreated
DateModified

ADOXのコレクション

コレクション プロパティ メソッド
Columns Item
Count
Append
Delete
Refresh
Groups Item
Count
Append
Delete
Refresh
Indexes Item
Count
Append
Delete
Refresh
Keys Item
Count
Append
Delete
Refresh
Procedures Item
Count
Append
Delete
Refresh
Tables Item
Count
Append
Delete
Refresh
Users Item
Count
Append
Delete
Refresh
Views Item
Count
Append
Delete
Refresh

参考