Difference between revisions of "ADO Database Connection VB6"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
Line 23: Line 23:
  
 
== Command Object ==
 
== Command Object ==
 +
 +
=== Properties ===
 +
 +
* ActiveConnection
 +
* CommandText
 +
* CommandType
 +
 +
=== Methods ===
 +
 +
* Execute
 +
 +
== RecordSet Object ==
 +
 +
=== Properties ===
 +
 +
* CursorLocation
 +
* CursorType
 +
* EOF and BOF
 +
* Fields
 +
* LockType
 +
* RecordCount
 +
 +
=== Methods ===
 +
 +
* AddNew
 +
* Close
 +
* MoveNext
 +
* MoveFirst
 +
* MoveLast
 +
* Open
 +
* Update
 +
* UpdateBatch
 +
 +
 +
 +
 
  
 
[[Category:Computer Technology]]
 
[[Category:Computer Technology]]
 
[[Category:Programming]]
 
[[Category:Programming]]
 
[[Category:VB6]]
 
[[Category:VB6]]

Revision as of 11:28, 30 October 2007

The old database access method using Jet has been replaced in VB6 by the new ADO or Active Data Objects. ADO makes it easier to access data from existing databases such as a Microsoft Access database or from an ODBC database connection such as MS SQL or Oracle.

Three Important objects in the ADO object model are:

  • Connection Object
  • Command Object
  • RecordSet Object

Connection Object

Properties

  • ConnectionString
  • Provider
  • Mode
  • CursorLocation
  • ConnectionTimeout
  • CommandTimeout

Methods

  • Close
  • Open

Command Object

Properties

  • ActiveConnection
  • CommandText
  • CommandType

Methods

  • Execute

RecordSet Object

Properties

  • CursorLocation
  • CursorType
  • EOF and BOF
  • Fields
  • LockType
  • RecordCount

Methods

  • AddNew
  • Close
  • MoveNext
  • MoveFirst
  • MoveLast
  • Open
  • Update
  • UpdateBatch