[AccessD] Variable data type for holding ADODB.recordset RecordCount on MS Access 64 bit

Rocky Smolin rockysmolin2 at gmail.com
Mon Feb 8 00:15:04 CST 2021


is ADO a requirement?  I've always found DAO to be much easier to work with
and seems faster in many cases.

Not the help you're looking for I know. But I tried ADO years ago and never
went back to it.

r

On Sun, Feb 7, 2021 at 9:35 PM Borge Hansen <pcs.accessd at gmail.com> wrote:

> 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
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list