SCIROCCO Software Development, Database Design, Downloads and Consulting  
SCIROCCO HomeHome ServicesServices DownloadsDownloads Careers at SCIROCCOCareers Tell A FriendTell a Friend Contact SCIROCCOContact


 
Properties, Methods and Events for the SCIROCCO ADO Data Control 1.0
(If you have any questions or need help using the control please contact . It will be our pleasure to assist you.)


Properties Methods Events

Data
Connection (Object)
CursorLocation
CursorType
DisconnectedRecordset
LockType
Recordset (Object)
RefreshMode
Transactions
Appearance
AboutVisible
BackColor
CaptionOn
Enabled
FontName
FontSize
Height
Language (Coming Soon)
MousePointer
PictureOn
Visible
Width
Misc
Version

Recordset
OpenRecordset
CloseRecordset
Data
AddNew
Delete
Refresh
Find
Undo
Save
Navigation
MoveFirst
MovePrevious
MoveNext
MoveLast
Close
CloseClick
Misc
About

StartUp
Initialize
Data
AddNewComplete
DeleteComplete
RefreshComplete
UndoComplete
SaveComplete
Navigation
MoveComplete
MoveFirstComplete
MovePreviousComplete
MoveNextComplete
MoveLastComplete
Close
Terminate
CloseClicked


Data Properties

Connection (Object)

You can retrieve the current connection being used by the Data Control using this Object Property. It represents an open ADO connection to a data source.

Set MyConnection = SCIROCCOADODataControl.Connection

Return to Top
CursorLocation

Specifies the location of the cursor service.

Constant Value Description
adUseClient 3 Default. Uses client-side cursors supplied by a local cursor library. Local cursor services often will allow many features that driver-supplied cursors may not, so using this setting may provide an advantage with respect to features that will be enabled. For backward compatibility, the synonym adUseClientBatch is also supported.
adUseNone 1 Does not use cursor services. (This constant is obsolete and appears solely for the sake of backward compatibility.)
adUseServer 2 Default. Uses data-provider or driver-supplied cursors. These cursors are sometimes very flexible and allow for additional sensitivity to changes others make to the data source. However, some features of the Microsoft Cursor Service for OLE DB (such as disassociated Recordset objects) cannot be simulated with server-side cursors and these features will be unavailable with this setting.
Return to Top
CursorType

Specifies the type of cursor used.

Constant Value Description
adOpenDynamic 2 Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them.
adOpenForwardOnly 0 Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset.
adOpenKeyset 1 Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.
adOpenStatic 3 Default. Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible.
adOpenUnspecified -1 Does not specify the type of cursor.
Return to Top
DisconnectedRecordset

Specifies if the recordset is disconnected or connected. The CursorLocation must be set to adUseClient.

Constant Value Description
True 1 Default. All data manipulations are done using a disconnected recordset. There is no constant connection being kept with the server. Whenever any data modifications are made, a connection is made and then dropped. This mode uses the least resourses.
False 0 There is a constant connection being kept with the server. This mode uses more network resourses as a constant connection must be kept.
Return to Top
LockType

Specifies the type of lock placed on records during editing.

Constant Value Description
adLockBatchOptimistic 4 Default. Indicates optimistic batch updates. Required for batch update mode.
adLockOptimistic 3 Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you cclick on the Save button.
adLockPessimistic 2 Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately after editing. The CursorLocation must be set to adUseServer.
adLockReadOnly 1 Indicates read-only records. You cannot alter the data.
adLockUnspecified -1 Does not specify a type of lock.
Return to Top
Recordset (Object)

You can set or retrieve the current recordset being used by the Data Control using this Object Property. It represents an open ADO recordset.

The Object property is very useful when you want to set the Data Control to another recordset.

Syntax Example:

Set SCIROCCOADODataControl.Recordset = MyRecordset

Return to Top
RefreshMode

Specifies the scope of the Refresh Button.

Constant Value Description
adAffectCurrentRecord 1 Default. Only refreshes the current record.
adAffectAllRecord 3 Refreshes all the records of the recordset. If you have a large number of records this may take some time.
Return to Top
Transactions

Specifies whether transactions are used. Transactions are only available with the CursorLocation set to adUseServer.

Constant Value Description
True 1 Default. Transactions are used in all instances. Any errors that occur are rolled-back on the server I.e. if you have made changes to 100 records and are then saving it and your system crashes in the middle of the save, your system will roll-back to its initial state.
False 0 Transactions are never used. Any errors that occur are not rolled-back on the server I.e. if you have made changes to 100 records and are then saving it and your system crashes at the 50th record in the middle of the save, your system will have 50 records saved and 50 records not saved.
Return to Top

Appearance Properties

AboutVisible

This property is only available on the registered control. Set this property to make visible or hide the About button.

Constant Value Description
True 1 Default. About button is visible.
False 0 About button is hidden.
Return to Top
BackColor

Returns or sets the background color of the control.

Return to Top
CaptionOn

Set this property to make visible or hide the captions of the buttons.

Constant Value Description
True 1 Captions are is visible.
False 0 Default. Captions are hidden. Pictures are visible.
Return to Top
Enabled

This attribute specifies if the control is enabled or disabled. The buttons appear gray when disabled.

Constant Value Description
True 1 Default. Control is enabled. Features that your Data Provider does not support, or depending on your choice of properties are automatically disabled I.e. If you you choose a LockType=adLockReadOnly the Add New, Delete, Refresh, Undo and Save buttons will be disabled even if the control is enabled.
False 0 Control is disabled.
Return to Top
FontName

Returns or sets the FONT used by the captions in the control.

Return to Top
FontSize

Returns or sets the FONT SIZE used by the captions in the control.

Return to Top
Height

Returns or sets the height dimension of the control.

Return to Top
Language (Coming Soon)

Returns or sets the language of the control

Constant Value Description
adEnglish 0 Default. Control captions and messages are in English.
adFrench 1 Control captions and messages are in French.
adSpanish 2 Control captions and messages are in Spanish.
adGerman 3 Control captions and messages are in German.
adItalian 4 Control captions and messages are in Italian.
adSwedish 5 Default. Control captions and messages are in Swedish.
Return to Top
MousePointer

Returns or sets a value indicating the type of mouse pointer displayed when the mouse is over the control at run time.

Constant Value Description
vbDefault 0 (Default) Shape determined by the object.
vbArrow 1 Arrow.
vbCrosshair 2 Cross (crosshair pointer).
vbIbeam 3 I beam.
vbIconPointer 4 Icon (small square within a square).
vbSizePointer 5 SIZE (four-pointed arrow pointing north, south, east, and west).
vbSizeNESW 6 SIZE NE SW (double arrow pointing northeast and southwest).
vbSizeNS 7 SIZE N S (double arrow pointing north and south).
vbSizeNWSE 8 SIZE NW SE (double arrow pointing northwest and southeast).
vbSizeWE 9 SIZE W E (double arrow pointing west and east).
vbUpArrow 10 Up Arrow.
vbHourglass 11 Hourglass (wait).
vbNoDrop 12 No Drop.
vbArrowHourglass 13 Arrow and hourglass.
vbArrowQuestion 14 Arrow and question mark.
vbSizeAll 15 SIZE all.
Return to Top
PictureOn

Set this property to make visible or hide the pictures of the buttons.

Constant Value Description
True 1 Default. Pictures are visible.
False 0 Pictures are hidden. Captions are visible.
Return to Top
Visible

Returns or sets a value indicating whether an the control is visible or hidden.

Setting Description
True Default. Control is visible.
False Control is hidden.
Return to Top
Width

Returns or sets the width dimension of the control.

Return to Top

Misc Properties

Version

Returns the version of the control.

Return to Top

Recordset Methods

OpenRecordset

Creates and opens a new Recordset object and appends it to the control. The SCIROCCO ADO Data Control is now bound to this recordset.

Syntax

SCIROCCOADODataControl.OpenRecordset (SQLStatement, ConnectionString )

The OpenRecordset method syntax has these parts.

Part Description
SQLStatement A valid SQL Statement compatible with the Data Provider you are using.
I.e. SELECT * FROM Authors
ConnectionString A valid ADO Connection String.
To connect to SQL Server a valid string would be:
I.e. Provider=SQLOLEDB.1;Initial Catalog=DataBaseName;Data Source=ServerName

To view examples for all data providers (Oracle, SQL Server, Access etc...) click here.
Return to Top
CloseRecordset

Closes recordset and connection (if not a disconnected recordset) and releases them from memory.

Syntax

SCIROCCOADODataControl.CloseRecordset()

Return to Top
Data Methods

AddNew

Adds a new record to the current recordset. Calling this method is the same as clicking on the Add New command button. If the Add New command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.AddNew()

Return to Top
Delete

Deletes the current record from the recordset. Calling this method is the same as clicking on the Delete command button. If the Delete command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.Delete()

Return to Top
Refresh

Refreshs the current recordset. Calling this method is the same as clicking on the Refresh command button. If the Refresh command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.Refresh()

Return to Top
Find

Displays the Find dialog box. Calling this method is the same as clicking on the Find command button. If the Find command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.Find()

Return to Top
Undo

Undoes additions, changes or deletions that haven't been saved. Calling this method is the same as clicking on the Undo command button. If the Undo command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.Undo()

Return to Top
Save

Saves additions, changes or deletions to current recordset. Calling this method is the same as clicking on the Save command button. If the Save command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.Save()

Return to Top

Navigation Methods

MoveFirst

Moves the record pointer to the first record of the current recordset. Calling this method is the same as clicking on the MoveFirst command button. If the MoveFirst command button is disabled calling this method will have no effect.

Return to Top
MovePrevious

Moves the record pointer to the previous (or first) record of the current recordset. Calling this method is the same as clicking on the MovePrevious command button. If the MovePrevious command button is disabled calling this method will have no effect.

Return to Top
MoveNext

Moves the record pointer to the next (or last) record of the current recordset. Calling this method is the same as clicking on the MoveNext command button. If the MoveNext command button is disabled calling this method will have no effect.

Return to Top
MoveLast

Moves the record pointer to the last record of the current recordset. Calling this method is the same as clicking on the MoveLast command button. If the MoveLast command button is disabled calling this method will have no effect.

Return to Top
Close Methods

CloseClick

Closes the form that the control is on. Calling this method is the same as clicking on the Close command button. If the Close command button is disabled calling this method will have no effect.

Syntax

SCIROCCOADODataControl.CloseClick()

Return to Top

Misc Methods

About

Displays the About Screen.

Syntax

SCIROCCOADODataControl.About()

Return to Top

StartUp Events

Initialize

Occurs after the control is loaded into memory. You can use this event to open your recordset or bind your controls.

Return to Top

Data Events

AddNewComplete

Occurs after clicking the Add New button and the successful addition of a new record.

Return to Top
DeleteComplete

Occurs after clicking the Delete button and the successful deletion of the current record.

Return to Top
RefreshComplete

Occurs after clicking the Refresh button and a successful refresh of the data.

Return to Top
UndoComplete

Occurs after clicking the Undo button and a successful restoring of the data.

Return to Top
SaveComplete

Occurs after clicking the Save button and a successful save of the data.

Return to Top

Navigation Events

MoveComplete

Occurs after clicking on any of the navigation buttons and the move has completed.

Return to Top
MoveFirstComplete

Occurs after clicking the Move First button and the current record has become the first record.

Return to Top
MovePreviousComplete

Occurs after clicking the Move Previous button and the current record has become the previous or first record.

Return to Top
MoveNextComplete

Occurs after clicking the Move Next button and the current record has become the next or last record.

Return to Top
MoveLastComplete

Occurs after clicking the Move Last button and the current record has become the last record.

Return to Top

Close Events

Terminate

Occurs before the control will be released from memory.

Return to Top
CloseClicked

Occurs after clicking the Close button and before the Terminate event.

Return to Top



SPONSORED LINKS



SCIROCCO HomeHome ServicesServices DownloadsDownloads Careers at SCIROCCOCareers Tell A FriendTell a Friend Contact SCIROCCOContact Legal InformationLegal


Copyright 2003-2004 ©  . All rights reserved.