UtterAccess.com
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    
 
   
stephenAA5
post Oct 10 2018, 04:38 PM
Post#1



Posts: 288
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?

UPDATE:
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.

Thanks,

Stephen.
This post has been edited by stephenAA5: Oct 10 2018, 05:19 PM
Go to the top of the page
 
GroverParkGeorge
post Oct 10 2018, 06:46 PM
Post#2


UA Admin
Posts: 34,086
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
 
stephenAA5
post Oct 10 2018, 06:59 PM
Post#3



Posts: 288
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
 
stephenAA5
post Oct 12 2018, 01:35 PM
Post#4



Posts: 288
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,
Stephen.

-----------------------------------------------------------------

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)

AARRGGH!!
Go to the top of the page
 
isladogs
post Nov 29 2018, 02:58 PM
Post#5



Posts: 779
Joined: 4-June 18
From: Somerset, UK


Stephen
Have you checked the various timeout values in client settings?
Go to the top of the page
 
GroverParkGeorge
post Nov 29 2018, 08:49 PM
Post#6


UA Admin
Posts: 34,086
Joined: 20-June 02
From: Newcastle, WA


To those who reported the serial spammer, there was a small misstep in the banning that allowed him/her to slide back in. Gone for good, now, I hope.

--------------------
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
 
Minty
post Nov 30 2018, 06:13 AM
Post#7



Posts: 151
Joined: 5-July 16



Whilst this is of no help, I can report similar weirdness with Access calling batch or cmd files.

I have a front end updater that creates a cmd file on the user machine. Part of the CMD file is to re-open the new version of the FE at the end of the script.
This is then called by Access and a Application.Quit is issued.

In certain circumstances (normally over a slower network connection) the batch file manages to run and doesn't complete the file copy before trying to reopen Access, and as a result the whole process keels over.

If you run the cmd / batch file manually you NEVER get the same issue, only when it's called from Access.
Very strange.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    12th December 2018 - 11:21 AM