NetTalk Central

Author Topic: NetTalk threads and open files  (Read 2942 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
NetTalk threads and open files
« on: March 03, 2014, 10:00:36 PM »
Hi all, just come across a curious situation here, and wondering if someone can shed some light on where the problem lies.

We have designed a small NetTalk app for a customer to register walk in members for a gym.  Really simple NetTalk site with a page that asks for the member ID (which is scanned at the terminal), then another Process that checks the number against a legacy database and then displays either a "Welcome" screen or a "Please Register" screen momentarily before going back to the main screen.

The only file access is during the CheckLogin procedure that gets called by the IndexPage.  The CheckLogin process opens up the user file on the legacy database using an ODBC driver, then closes the files straight afterwards.

I thought this would only momentarily touch the files and exit, leaving those files free from locks, however the customer's IT department is saying that they cannot backup the legacy database every night because it is saying the files are open in the NetTalk app.  Closing down or restarting the NetTalk app completely appears to clear the locks.

Now, I thought that once I deliberately closed the files in the Process, or the process thread ended, the files would be closed and any locks released?  Could there be phantom threads still running in the background?  Is the fault with the third party ODBC driver?  Or the Clarion ODBC driver architecture?

The files are defined in the main app dictionary, but the files are ONLY referenced in the CheckLogin NetWebPage - which is not actually a displayed page, but a snippet of embed code that then redirects the user depending on the check login status.

It's not a huge problem, but I'm curious to know where to start looking for the issue.

Thanks,
Devan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetTalk threads and open files
« Reply #1 on: March 03, 2014, 10:25:10 PM »
>> Now, I thought that once I deliberately closed the files in the Process, or the process thread ended, the files would be closed and any locks released? 

Indeed.

>> Could there be phantom threads still running in the background? 

maybe, but that seems unlikely. (NT8 has a mechanism for detecting threads that haven't been closed properly, so that may help.)

>> Is the fault with the third party ODBC driver?  Or the Clarion ODBC driver architecture?

possibly - I don't know then well enough to be sure.

the STATUS command may give you some clues, but that's thread-relative, so maybe only helpful if you know where the error is already.

(I'm assuming your WebServer window has no files attached to it?)

cheers
Bruce