ADO Code Examples in Visual Basic
Use the following code examples to learn how to use the ADO methods, properties, and events when writing in Visual Basic.
Note Paste the entire code example, from Sub to End Sub, into your code editor. The example may not run correctly if partial examples are used or if paragraph formatting is lost.
Methods
- AddNew Method Example
- Append and CreateParameter Methods Example
- AppendChunk and GetChunk Methods Example
- BeginTrans, CommitTrans, and RollbackTrans Methods Example
- Cancel Method Example
- Clone Method Example
- CompareBookmarks Method Example
- ConvertToString Method Example
- CopyRecord, CopyTo, and SaveToFile Methods Example
- CreateRecordset Method Example
- Delete Method Example
- DeleteRecord and MoveRecord Methods Example
- Execute, Requery, and Clear Methods Example
- Find Method Example
- GetRows Method Example
- GetString Method Example
- SkipLine Method, EOS, and LineSeparator Properties Example
- Move Method Example
- MoveFirst, MoveLast, MoveNext, and MovePrevious Methods Example
- NextRecordset Method Example
- Open and Close Methods Example
- OpenSchema Method Example
- Read, ReadText, Write, and WriteText Methods Example
- Refresh Method Example
- Resync Method Example
- Save and Open Methods Example
- Seek Method and Index Property Example
- Supports Method Example
- Update and CancelUpdate Methods Example
- UpdateBatch and CancelBatch Methods Example
Properties
- AbsolutePage, PageCount, and PageSize Properties Example
- AbsolutePosition and CursorLocation Properties Example
- ActiveCommand Property Example
- ActiveConnection, CommandText, CommandTimeout, CommandType, Size, and Direction Properties Example
- ActualSize and DefinedSize Properties Example
- Attributes and Name Properties Example
- BOF, EOF, and Bookmark Properties Example
- CacheSize Property Example
- ConnectionString, ConnectionTimeout, and State Properties Example
- Count Property Example
- CursorType, LockType, and EditMode Properties Example
- Description, HelpContext, HelpFile, NativeError, Number, Source, and SQLState Properties Example
- EOS and LineSeparator Properties, SkipLine Method Example
- Filter and RecordCount Properties Example
- IsolationLevel and Mode Properties Example
- Item Property Example
- MarshalOptions Property Example
- MaxRecords Property Example
- NumericScale and Precision Properties Example
- Optimize Property Example
- OriginalValue and UnderlyingValue Properties Example
- Prepared Property Example
- Provider and DefaultDatabase Properties Example
- Sort Property Example
- Source Property Example
- State Property Example
- Status Property Example
- StayInSync Property Example
- Type Property Example (Field)
- Type Property Example (Property)
- Value Property Example
- Version Property Example
See Also
ADO Code Examples in Microsoft Visual Basic Scripting Edition | ADO Code Examples in Microsoft Visual C++ | ADO Code Examples in Microsoft Visual J++ | Appendix D: ADO Samples