Databases
ActiveX Data Objects is the preferred method as it has a lighter model and can also access non relational data sources.
Cursors
Client cursors bring rows down to the client machine to be manipulated.
Server cursors manipulate the rows directly on the datasource.
When server side cursors are employed, the client will make multiple trips to the data source to work with rows from the resultset because they are by definition managed by the datasource.
Alternatively, when client side cursors are employed, the entire resultset is sent to the client using one SQL statement with the rows being managed by client side cursor code.
Server side cursors are more efficient when an application is likely to address a small percentage of rows in the resultset. Fewer round trips to the data source will be required. You should note, however that applications should be designed to ask for only rows required by the client.
To generate a firehose cursor, you must use a server side, forward only, read only cursor with a cache size of 1
CacheSize
The number of trips is affected by the CacheSize property of the recordset object, which indicates how many rows the data provider will keep in its cache with each call to the data source.
You have the option to The default cachesize is 1 for ADO, which makes a trip for every row.
Leaving the cachesize at 1 an dusing Server side cursors can in one case actually increase performance by bypassing cursors altogether ??
There is a trade off when having a large cache size since the rows returned wastes memory on the client
There is a problem with ADO in as much as you receive an E-FAIL error if you retrieve a numerical column that contains Null Values
The adParamReturnValue only needs to be declared as a parameter in ADO if a function returns a value
You can use the CreateParameter without any parameters and then assign the various properties (Name, Type, Direction, Size and Value) later although this is not recommended
What is Data Modelling ?
Data modelling organises and documents the data that will be stored in the database.
It provides a graphical representation of the structure of the database and how data will be represented in the database.
Understanding how data will be represented in the database will help you to avoid storing redundant or insufficient data.
Data modelling can be done either on paper or by specialised software.
Entity Relationship Diagram
An ERD (Entity Relationship Diagram) model represents data in terms of entities and relationships.
Entity - This is a table in a database, or a group of related things.
Relationship - This is an association between entities.
There are four different types of relationships:
An ERD model graphically depicts the relationships by using shapes, numbers, letters and lines.
Rectangles represent entities.
Diamonds combined with letters above the lines that connect the rectangles represents the relationships.
One to One Relationship
One to Many Relationship
Many to One Relationship
Many employees belong to one department
Many to Many Relationship
Each student is a member of many classes.
Each class contains many students.
CopyFromRecordset (Excel)
This method will fail if the recordset contains any OLE objects
Worksheets("Sheet1").Range("A1").CopyFromRecordset objADORecordset
KB(246335)
You can quickly transfer an ADO or DAO recordset to an Excel range by using the CopyFromRecordset method.
In Excel 97 this method is only available from a DAO recordset.
To transfer from an ADO recordset in Excel 97 you can use the GetRows method to create an array.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopNext