PocketBase - how to interface with Access code ? (1 Viewer)

ebs17

Well-known member
Local time
Today, 16:24
Joined
Feb 7, 2020
Messages
1,949
I've already tried different forums
Without success? How amazing.

In general: Outlook knows an event NewMail. This can be used via an event handler to do anything. So you could interpose Outlook or implement something similar directly in an Access application. It's a lot of work, even if you have the skills.

So now you have an idea. You probably haven't even installed PocketBase (the starting point of your analysis) yourself, let alone tried it out. The question of whether you can then also successfully send messages from it is answered automatically.

Now you haven't visibly shook hands yourself, but you express the expectation that a solution will be rolled out to you in a forum for a case that is unusual and even rather new territory. And you know: The devil is in the details.

So I would think your idea is a task for a job fair. The time for reflection and familiarization should be properly remunerated. A solution with explosive utility will certainly sell for good money once you have created it. You would hear about it.
 

amorosik

Member
Local time
Today, 16:24
Joined
Apr 18, 2020
Messages
390
Without success? How amazing.

In general: Outlook knows an event NewMail. This can be used via an event handler to do anything. So you could interpose Outlook or implement something similar directly in an Access application. It's a lot of work, even if you have the skills.

So now you have an idea. You probably haven't even installed PocketBase (the starting point of your analysis) yourself, let alone tried it out. The question of whether you can then also successfully send messages from it is answered automatically.

Now you haven't visibly shook hands yourself, but you express the expectation that a solution will be rolled out to you in a forum for a case that is unusual and even rather new territory. And you know: The devil is in the details.

So I would think your idea is a task for a job fair. The time for reflection and familiarization should be properly remunerated. A solution with explosive utility will certainly sell for good money once you have created it. You would hear about it.

Until a few years ago it seemed that Altavista was THE search engine par excellence
It seemed like nothing could be done better
Then Google arrived
And within a few years the way of looking for something on the internet radically changed

This is to say that "what is now" is not always the best thing that can be

I understand that the mindset of the average Access user can be to put four controls on a form, link it to the data, and get excited about the result
But not all of us are satisfied with so little...
...and I add, luckily
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 10:24
Joined
Apr 27, 2015
Messages
6,341
Until a few weeks ago it seemed that (enter any member here) was THE biggest (enter insult here) at AWF
It seemed like nothing could be worse
Then amorosik arrived
And within a few days the way of looking at trying to help (him/her) radically changed

This is to say that "what is now" is not always the best thing that can be

I understand that the mindset of the amorosik can leave a lot to be desired
But most of us are accustomed to dealing with so little...
...and I add, luckily
 

amorosik

Member
Local time
Today, 16:24
Joined
Apr 18, 2020
Messages
390
Until a few weeks ago it seemed that (enter any member here) was THE biggest (enter insult here) at AWF
It seemed like nothing could be worse
Then amorosik arrived
And within a few days the way of looking at trying to help (him/her) radically changed

This is to say that "what is now" is not always the best thing that can be

I understand that the mindset of the amorosik can leave a lot to be desired
But most of us are accustomed to dealing with so little...
...and I add, luckily

Why are you reacting like this?
Do you think I have offended anyone?
If any forum user thinks I have, please tell me where, and I'm ready to apologise
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 10:24
Joined
Apr 27, 2015
Messages
6,341
Why are you reacting like this?
Do you think I have offended anyone?
If any forum user thinks I have, please tell me where, and I'm ready to apologise
If you truly feel like you do not deserve the remarks I made, then let that be enough.
 

amorosik

Member
Local time
Today, 16:24
Joined
Apr 18, 2020
Messages
390
If you truly feel like you do not deserve the remarks I made, then let that be enough.

I'm sure I haven't offended anyone
But this is not the point
The question is, if any user of this forum has felt offended by any sentence I have written, please tell me where, and I am ready to apologise.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 10:24
Joined
Apr 27, 2015
Messages
6,341
The question is, if any user of this forum has felt offended by any sentence I have written, please tell me where, and I am ready to apologise.
For me, if isn't about being offended - I do not feel offended. Exasperation is the more accurate description.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 10:24
Joined
Apr 27, 2015
Messages
6,341
3d is an fairly obscure abbreviation for thread.
Ah, and I rest my case. No one forced me, I came on my own free will and accord in hopes that I may learn something useful. What I have learned is to avoid any 3ds (see what I did there?) that you(amorosik) are involved in.

I'm outta here again
Think I'll follow suit
 
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:24
Joined
Feb 28, 2001
Messages
27,195
I'm going to try to update this using moderator abilities to get in.

@amorosik -

Part 1: Let's talk Windows for a moment. It is a primary tenet of the Windows Operating System that tasks must be independent of each other, derived from an old U.S. Government requirement for inter-process security. Microsoft implemented the requirement because if they did not, the military would have disqualified ALL Windows systems from sensitive government offices. I don't know about the OTHER services, but the U.S. Navy Reserve "Outlook Address Book" held over 50,000 listings. Multiply that by Active Navy and then Reserve & Active Army, Air Force, Marine Corps, Coast Guard, ... and then the cabinet level departments. Microsoft couldn't NOT provide the requirement given the size of that market. Though the standard in question has long since been modernized, the old "C2" requirement based on something called "The Orange Book" absolutely required that, in the absence of privileges, no process could affect the state of another process directly without a pre-programmed interface for the purpose. My authority for that statement is 28 1/2 years of U.S Navy Reserve employment and yearly refreshers on security principles, plus the CompTIA "Security Plus" certification.

Part 2: Access runs under Windows as a non-privileged task and thus is protected and governed by the non-interference rule. Firebase, because it is not a part of Access, would of necessity run as a separate task from Access. Only the JET or ACE database engines are integrated to the Access environment. Firebase is not. Therefore without some defined interfaces, it would be ILLEGAL (and thus prevented) for Firebase to directly notify Access.

The way that Access talks to another Office component is that it launches the other utility and exercises the STDIN and STDOUT channels of the hosting process to communicate with the program. Those "other" components take on a life of their own and if Access dies while it has a partner process active, that partner doesn't die - but is now uncontrolled. So you usually have to kill it from the console.

Part 3: There would be one other possibility. If Firebase doesn't support ODBC but DOES provide a Component Object Model (COM) library to expose its various operations, it MIGHT be possible to interact with it intimately. Without either ODBC or COM interfaces, the answer is "no clean and easy interaction is possible."

Part 4: Let's consider your comments about communicating between Firebase and Access. Yes, Access absolutely and categorically CAN communicate via WinSock-related methods. The method to do this involves building a socket and setting up code to listen to that socket. The catch is that the code needs a supporting framework, and that USUALLY will be the class module of a form. When that form starts listening, if you want to be doing anything else you need to have another form open because Access executes all event-level (module-level) code SYNCHRONOUSLY. Each form has its own thread. A listener form is dead unless/until a message comes in. That listener form will do nothing else until the socket triggers something. (Emphasis: NO ASYNCHRONOUS I/O!!!) If you have a Firebase socket that connects to the Access socket (or vice versa) it would be possible to define a handshake between the two entities. Where it gets nasty is that Access is not designed to talk to anything other than JET/ACE engines unless using a recognized database linking protocol such as ODBC.

Let's say you do this via sockets, set up Firebase as the sender and set up an Access form as the listener. So.... you finally got a message to your listener? If the message contains a record, you could build a DAO.Recordset operation to do a table update, perhaps. But what you just did was re-invented the ODBC wheel. And of course, because of the synchronous nature of code in the Access program environment, you have to continue to re-prime the listener. Which means your sender has to be an active participant in the handshake. It can't send more than one record at a time, which means (gasp) polling, the very thing to which you objected.

Can Access do its part in this? Absolutely. Can Firebase do its part? Damned if I know. But your insistence on hammering at something that folks tried to explain to you shows your impatience and maybe also explains why the replies became so hostile.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:24
Joined
Feb 28, 2001
Messages
27,195
After discussions with Jon, I am re-opening the thread but with this warning.

@amorosik - remember that you are dealing with volunteers, each of whom comes here with different backgrounds. They came here, donating their time and effort, and your response to most of them was dismissive and therefore a bit callous. I am going to repeat something that I sent to you in our private thread.

Excerpt begins:

I would like to add one more factor that I glossed over. The reason this would be such a hot mess to do is because of the fact that when you run MSACCESS.EXE (the MAIN program), you do not have access to the source code and therefore cannot directly install interrupt hooks to the main program's interrupt handler code - the REAL interrupt handler that would be required to use in order to give asynchronous notifications.​
Access keeps those hardware interrupts to itself. If you cannot get to the hooks then you have to go all around the mulberry bush (and this is a VERY big bush) to get to a point where you can adapt code to fit your needs. It is part of the old saying: "If all you have is a hammer, everything had better be a nail." Access, because of its "everything in a black box" approach, is the hammer.​
Your Supabase solution involves sockets. Re-read my discussion in the main thread regarding the fact that in order to prevent missing a message (given the synchronous nature of Access I/O), you need to have a handshake which is morally equivalent or at least very similar to polling (which you said was not what you wanted to do). A listener that doesn't interact with its sender to prepare the way for each message is going to lose a lot of messages. TCP/IP (the basis for sockets) intimately uses handshakes to keep itself going. The structure and layout of Access is just not conducive to your goals.​
Let me further add that if Access were, indeed, an open system, what you wanted to do MIGHT be a lot easier. But that just isn't the case. So I'm going to echo something you have heard already, but qualify it slightly. Given the "black box" nature of Access; the SYNCHRONOUS I/O nature of Access; the non-parallel implementation of event code; and the fact of pseudo-code emulation of VBA rather than having true machine-code emulation, I would have to say that for 99% of the normal Access users, your goal really CANNOT be achieved. If you think you are in the 1% then go for it - but it is something I would not want to have to do and I think you realize that I understand your problem a lot better than some members.​

Excerpt ends.

When you ask if something is possible, you already know that anything is possible in programming given time, money, and the right tools. I must respectfully suggest that Access is not the right tool for the job you want to do because it involves re-inventing too many wheels and thus becomes a very high-risk, narrow-reward endeavor. I won't say "impossible" but I will say "difficult enough to make me suggest looking to some other tools."
 

amorosik

Member
Local time
Today, 16:24
Joined
Apr 18, 2020
Messages
390
Thank you for the words you are spending, but for me, as I have already written to you, the question is closed
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:24
Joined
Feb 28, 2001
Messages
27,195
"Pearls and swine" springs to mind...

I thought it was the right idea to reopen the thread and Jon thought so, too. Amorosik started by asking a legit question. The problem developed because he didn't like the answers he was getting. My answer didn't help him either, but I give him the best technical answer I knew how to give. If he can't live with my answer, he is free to continue to search the world for another one. And that is at least partly Jon's viewpoint based on the behind-the-scenes report discussion.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:24
Joined
Feb 19, 2002
Messages
43,302
No one is criticizing your answer Doc. It is more detailed and technical than earlier answers.
 

Users who are viewing this thread

Top Bottom