X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Shelled Program Quits Early..., Access 2016    
post Oct 10 2018, 04:38 PM

Posts: 280
Joined: 8-October 09

Hello, all. I have a program that is successfully launched by Access using ShellEx. It successfully parses a large XML file back into Access.

It will process all data when launched by hand. When launched via ShellEx, it shuts down after a few thousand records.

The only difference is the launch method. Also, when viewed in Task Manager, it runs beneath Access when launched programmatically. Obviously this is not true when run directly.

I really need it to process all of the data (imagine that!)

My guess is that Access has some sort of time limit on how long it will allow something to run, and this violates it.

Any ideas of a workaround?

I tried creating a BAT file for Access to hit, which would subsequently launch the program. Apparently, Access (or Windows) doesn't see the difference between murder and contracting for murder, because it didn't work. Still stops at EXACTLY 4 minutes. When the BAT is hit directly (thus launching the EXE) it runs until finished.


This post has been edited by stephenAA5: Oct 10 2018, 05:19 PM
Go to the top of the page
post Oct 10 2018, 06:46 PM

UA Admin
Posts: 33,802
Joined: 20-June 02
From: Newcastle, WA

Hm. that suggests a timer at 4 minutes, or a 4 minute timeout.

My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Visit My Blog on Facebook
Go to the top of the page
post Oct 10 2018, 06:59 PM

Posts: 280
Joined: 8-October 09

Yep. I just can't figure out what's imposing the timer. Here's the module contents, but I don't see anythign that would be a limit...

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal lpnShowCmd As Long) As Long

Public Sub shellex(ByVal Path As String, Optional ByVal Parameters As String, Optional ByVal HideWindow As Boolean)

If Dir(Path) > "" Then
ShellExecute 0, "open", Path, Parameters, "", IIf(HideWindow, 0, 1)
End If

End Sub
Go to the top of the page
post Oct 12 2018, 01:35 PM

Posts: 280
Joined: 8-October 09

This is getting really ridiculous. I've built a simplified example (well, somewhat) and am happy to share it on dropbox, but can't post a link here.

Tried moving PC's, and somehow still it reverts to an older version. Went through fileExplorer to delete everything I could find, and it STILL doesn't help! Set "break on all errors," no love. I can provide a dropbox link, which demonstrates the problem as described here at the bottom.

I appreciate ANY suggestions. I'm trying everything I can think of.
Thank you,


In the Parsing folder, there is a database called FrontEnd.accdb. A form opens OnOpen, and relinks to a backend.
When the "Parse!" button is pressed, it is supposed to launch the file in -----[your relative path] \QB\XML\Parser\CustomerParser\CustomerParser\bin\R elease\CustomerParser.exe (this creates a log file, as well...)

This CustomerParser.exe in turn looks to the file in: [your relative path] \QB\XML\Data\Customer.xml and puts the data from it into [your relative path]\QB\Plexis.accdb's "customers" table. This table is linked to the FrontEnd, so you don't have to actually go there.

I have put two data files, Customer.xml and Customer1.xml, so that I can test to see if the data changes by swapping the names. One is much larger than the other. Nothing changes if run via VBA against the two files separately.

HOWEVER, if you go to CustomerParser.exe directly, it runs fine. The larger file generates 910 records. The smaller one generates 81. When run by code, I get 1 on one machine (where the original file run on that machine months ago contained 1) and 2588 (where that was the contents of the original file run on that machine)

Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    24th October 2018 - 12:09 AM