Bilbo_Baggins_Esq
Registered User.
- Local time
- Today, 01:50
- Joined
- Jul 5, 2007
- Messages
- 586
We have an automated tool to programmatically convert older files to newer formats.
Among other things, the tool reads the VBA for various potential errors and deprecated methods, constants, etc.
Bear in mind, all of these files with code are, in theory, fully functional in the older environment (XP w/2k3) when they are submitted.
Where possible, the automated tool performs some updates to the code.
One of the items it clearly does not like how our users have written them is recordsets.
For example:
Dim rs As Recordset
The above line of code gets changed to:
Dim rs As DAO.Recordset
After the automated tool completes the processes for a file, it generates a list of changes and suggestions (for items it could not change).
We provide that information back to the submitter in the form of a workbook.
On the lines where it details changes made for “Recordset”, it adds these comments:
Error Name: DAO Syntax Errors
Error Description: Unless existing DAO references are declared exclusively it is possible that run time errors can occur. Added DAO to the recordset declaration
I have used the same exact methodology as shown in the pre-edited example for years and do not recall ever encountering any errors because of that syntax.
We can turn this feature off, but before I do, I bring this question to the masters here.
Can anybody think of potential run-time errors that could result in an otherwise functional database directly attributable to failing to designate “DAO.recordset”?
Thanks in advance!
Among other things, the tool reads the VBA for various potential errors and deprecated methods, constants, etc.
Bear in mind, all of these files with code are, in theory, fully functional in the older environment (XP w/2k3) when they are submitted.
Where possible, the automated tool performs some updates to the code.
One of the items it clearly does not like how our users have written them is recordsets.
For example:
Dim rs As Recordset
The above line of code gets changed to:
Dim rs As DAO.Recordset
After the automated tool completes the processes for a file, it generates a list of changes and suggestions (for items it could not change).
We provide that information back to the submitter in the form of a workbook.
On the lines where it details changes made for “Recordset”, it adds these comments:
Error Name: DAO Syntax Errors
Error Description: Unless existing DAO references are declared exclusively it is possible that run time errors can occur. Added DAO to the recordset declaration
I have used the same exact methodology as shown in the pre-edited example for years and do not recall ever encountering any errors because of that syntax.
We can turn this feature off, but before I do, I bring this question to the masters here.
Can anybody think of potential run-time errors that could result in an otherwise functional database directly attributable to failing to designate “DAO.recordset”?
Thanks in advance!