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

Jim Dettman jimdettman at verizon.net
Mon Feb 8 07:11:50 CST 2021


I remember when this broke, but I don't remember the particulars as I was
using DAO mostly.

This all should have been patched up however at this point, so I believe
it's a matter of selecting the right lib (6.1) and re-compiling.

The original blog post on the problem can be found here:

https://web.archive.org/web/20120331232037/http://blogs.msdn.com/b/psssql/ar
chive/2011/10/03/yes-we-made-a-mistake-and-are-finally-going-to-fix-it.aspx

HTH,
Jim.

-----Original Message-----
From: AccessD On Behalf Of Rocky Smolin
Sent: Monday, February 8, 2021 1:15 AM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Variable data type for holding ADODB.recordset
RecordCount on MS Access 64 bit

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-ba8aae
20-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
>
-- 
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