[AccessD] Variable data type for holding ADODB.recordset RecordCount on MS Access 64 bit
Borge Hansen
pcs.accessd at gmail.com
Sun Feb 7 23:35:17 CST 2021
Help!
We are converting a fairly large Access app to run in Office 64 bit
environment.
We have modified all Functions to PtrSafe.
We are now debugging / compiling the app and identifying variables to have
to be set to LongPtr to play along with the PtrSafe API functions.
We ran into a 'type mismatch' issue like this:
lngTotal = rs.recordcount
for an ADODB.recordset
There is long support article at Microsoft, talking about ADO using
longlong datatype on 64 bit systems which causes problems with applications
using variables with Long data type
https://support.microsoft.com/en-us/topic/-type-mismatch-error-message-when-you-run-a-vba-macro-in-a-64-bit-version-of-an-office-2010-application-ba8aae20-0762-4108-93de-1787f6e09076
It talks about applying a hotfix for your particular issue.
The article appears to be several years old.
We want to be able to run the converted app in both 32 bit and 64 bit.
Is it a matter of just referencing another ADO library - and if so which
one? - or do we also need to apply conditional compile arguments for the
scenario
dim lngTotal as long
lngTotal = rs.recordcount
We have been using
Microsoft ActiveX Data Objects 2.8 Library (msado28.tlb)
for the past ten years or more.
We are compiling using MS Access 2019 on a Windows 10 VM with latest updates
Anyone who can help with this??
???
/borge
More information about the AccessD
mailing list