01-28-2009 06:29 AM
One of my programmer's who has the Office tool kit noticed this on Monday, and we haven't been able to find the problem yet.
We use the database connectivity reads and writes to a MS Access database. This program reads the data from a Symbol Scanner, and then inputs it into the database. He then has a query that to create a data table to pump into the MS Toolkit to build a MS World file (This is for a Bill of Lading).
What we found it that it works really well the first time, and on any further runs it will not update the database with any new data. It starts working again if we do a restart on the computer. It seems like something is not freeing up the database. He is freeing all the tables and closing the DB connection at each process, and everything else seems to be doing everything else right. I think the problem is that it goes into this MS Toolkit to make the table that goes on the Bill of Lading.
I did a modification that makes it read from an excel file on my desktop, and I found that it is doing the same thing. I deleted the report generator part of the program, and found that it will update the database properly. I have no clue.
here is the machine specs:
labview 8.6
Database connectivity toolkit 1.0.2
Report generator toolkit MS Office 1.1.3
MS Office 2007, the file is a Office 2003 format,
01-28-2009 06:59 AM
Given that the code still fails when talking to a excel file it sounds like this isn't really related to the database. Can you post a bit of your that shows the problem. Beyond that, be looking for things in the code that change between subsequent interations -- things like shift registers, globals, etc.
On the other hand, the fact that you have to restart the computer would tend to indicate that there is something going on with the MS Office side of things. To be clear: shutting down and restarting LV is NOT sufficient to clear the problem?
When the problem is occurring, if you shut down LV and open the Task Manager do you see (on the Processes tab) any MS Office components still running?
Mike...
01-28-2009 07:31 AM
The program is designed to run continuously. You input one shipment, and its info. You then can do another and another. Hit exit to close it.
Brian's project today is to clean up the code... I'll post it then. The little bugger had made it about as ugly as you can possibly imagine. There is not globals, or clusters, ot anything else..... its really messy, but simple hahahahaha...
01-28-2009 01:17 PM - edited 01-28-2009 01:18 PM
This is just weird.... I haven't looked into how NI did the actual connection to MS Office, but It seems to come how not disconnect from the resources once the file has been made.
I did try closing word file completely (manually and in labview), but it doesn't disconnect for some reason. I litterally have to exit the program before it will let go of the resources.
01-29-2009 10:52 AM
01-30-2009 10:29 AM
Hi Zinnium
I apologize for the frustration you have experienced, thank you for bringing this issue to our attention. It appears that you have discovered a work around to the problem. Can you possibly post the code that is causing this behavior and your fix. I can then submit this for a corrective action request.
01-31-2009 04:40 PM
Eric,
All I did was make the report generator that made the Bill of Lading a separate EXE that runs and exits itself once it completed, and called it from the main program. It was the only thing I could find that worked. I didn't dig too deep in to you code since I really don't want to mess things up and have to do a re-install. You all may want to add an additional function that just simply disconnects the itself from the MS services. Just like the disconnect from database function.
The code just did a basic database query that builds a table of entries then goes to the report. The MS report code was much like the NI examples of how to make a report using the express VI, or the hrad way. He was using the hard way to do this. He actually just copied and pasted from your example and used that. the only major difference was the addition of a few more entries. I did also try to use the express VI, and found you have the same problem there as well.
02-02-2009 05:31 PM
Hi Zinnium
Thank you for the feedback and the work around.