Documente Academic
Documente Profesional
Documente Cultură
To use the ADO Library inside a Visual Basic 5.0 project,follow these steps:
1. Install the OLE DB SDK 1.5,which will register all assosciated DLLs and
update all the clients installed on the machine.
2. Go to project from the VB Main toolbar and select project.scroll down until
you get to References and click to bring up the project References dialog box.
3. In the References dialog box, scroll down until you see Microsoft ActiveX
Data Objects 2.0 Library and make sure that the check box is checked.If the
item does not appear in the list you can click the Browse button and try to find
the file yourself.The ADO library DLL is named MSADO15.DLL.
Some of the parameters to which ADO connects to the database.These properties include
the following:
Default Value:30
Default Value:15
Cursor Location sets or returns a Long integer specifying the cursor location.The
constraints for this are adUseClient or adUseServer.This property enables you to
choose between various cursor libraries accessible to the provider.Using
adUseClient that might allow features that driver-side cursors do not provide.Using
adUseServer enables cursors that are sometimes very flexible.
Default Value: adUseServer
adXactchaos - you cannot overwrite pending changes from more highly isolated
transcations.
adXactBrowse From one transction you can view uncommitted changes in other
transactions.
adXactCursorStability From one transction you can view changes in other transactions
only after they have been committed.
Mode Sets or return the access permissions in use by the provider on the
current connection. You can use the Mode only when the State property of the
connection object is closed.
adModeUnknown Indicates that the permissions have not yet been set or cannot
be determined.
Many database structures that are accessed by more than one individual require the
capability to track changes made to the database and the capability to either accept or
decline those modifications.
The 3 methods that the ADO Connection object incorporates to facilitate these
requirements are:
BeginTrans.
CommitTrans.
RollbackTrans.
Each ADO Error object represents a specific provider error,not an ADO error.
By initiating a new request to the Collection object the Error object count is cleared and
then set according to the number of errors returned that were not handled by the ADO
object library.
The Errors collection holds the numbers and description of the errors that have occured.
This information can br retrieved by using the syntax of the Error_Enumerator code.
The ADO Error object is equivalent to the DAO Workspace's Error object.
ADO providers support Parameterized commands.These are the commands where the
desired action is defined once,but variables are used to alter the details of the command.
You use the Parameter object collection in conjunction with the ADO command object to
run stored procedures or Parameterized commands.Before using the Parameter
object,examine its following properties and methods:
Attributes Indicates how the Parameter object handles the parameter value.
There are 3 possible options for this property:
Size Used to determine the maximum size for values read or written from
theValue property of the Parameter object.