32 bit and 64 bit msAccess (1 Viewer)

patrickS

New member
Local time
Today, 19:07
Joined
Nov 22, 2020
Messages
4
I have a 32 bit msaccess database (2016), on various machines it runs on 32 bit access.

On one machine it runs on 64 bit access. herein sits the issue, I have declared the few API's as PTRSafe. I run the database from the 64 bit version of access complied in 32 bit and also try complied in the 64 bit version of access.

Now the issue, On a specific form (only one) that loads and runs perfectly in 32 bit, it comes a cropper in 64 bit after making a selection in a dropdown box, the database simply closes . This happens about 20 % of the time. nothing seems to be odd about the code within the after update in the dropdown box .

The code in the after update is populating a sub form with the contents of a table located in an external database that is not linked (this is done as the table chosen is very dynamic and linking via backend/front end is not viable.

It populates perfect in 32 bit and never crashes. If, in the 64 bit version of the database i open any other form, close it, then open the offending form it works perfectly every time, or if after i get the crash, reopen it it will work perfectly every time without having to open a different form first. the form is actually populating a sub form hence i tried to first populate the subform with a 'working form', then after a doevents command, populate the subform with the offending form. that doesnt help either



can anyone offer any advice as to why this might be happening, i would, sometime in the future have the database totally in 64bit but not at the moment with this happening on the only PC with 64 bit.
 

patrickS

New member
Local time
Today, 19:07
Joined
Nov 22, 2020
Messages
4
Further to the above, I also wonder if the populating of the sub form with data from this external database sometimes is causing the issue even though no error occurs, perhaps there is timing or file access over the network issue that sometimes occurs but is not generating a specific error that I can interroagate
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:37
Joined
May 7, 2009
Messages
19,169
post your API declaration.
putting PtrSafe is Not Enough to guarantee that the API will work on x64.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:37
Joined
Oct 29, 2018
Messages
21,357
Hi @patrickS. Welcome to AWF!

Also, please post the code for your dropdown.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:37
Joined
Feb 28, 2001
Messages
26,996
Is the external database Access or an active SQL engine like SQL server? That affects the connection method to some degree as well.
 

strive4peace

AWF VIP
Local time
Today, 03:37
Joined
Apr 3, 2020
Messages
1,003
hi Patrick,

Peter Cole is doing an online presentation on Tuesday 30 Nov for converting 32 to 64-bit for APIs ... and if he doesn't tell you what you need to know, you can ask questions if you're in the meeting

Access Lunchtime – Updating Access API calls to work with 64Bit​

https://accessusergroups.org/lunch/event/access-lunchtime-3-2021-11-30/

DATE: 30 November 2021
TIME: 12 noon central, 6pm UK

Join Webex Meeting -- free to join​

https://accessusergroups.my.webex.c.../j.php?MTID=m8a4ec3c411e5608272aebcf61910060c
 

sonic8

AWF VIP
Local time
Today, 09:37
Joined
Oct 27, 2015
Messages
998
Now the issue, On a specific form (only one) that loads and runs perfectly in 32 bit, it comes a cropper in 64 bit after making a selection in a dropdown box, the database simply closes . This happens about 20 % of the time. nothing seems to be odd about the code within the after update in the dropdown box .
Does the code in that AfterUpdate-Event call any of the API functions you "converted" to 64bit? - Simply adding PtrSafe is not enough for many API functions.
The symptom "Access crashes 20% of the time" is exactly what you would expect from API code using a 32bit pointer in a 64bit environment.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:37
Joined
Feb 19, 2013
Messages
16,553
this is a 12 month old thread - OP has not been back for over a year :)
 

strive4peace

AWF VIP
Local time
Today, 03:37
Joined
Apr 3, 2020
Messages
1,003
I didn't realize it was an old thread! sorry about that ... meeting is today for anyone interested. Don't have to be a member to join in -- anyone can join with the link.
 

Users who are viewing this thread

Top Bottom