LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with database tool kit, and MS Office Tool kit.

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, 

0 Kudos
Message 1 of 8
(3,142 Views)

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


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(3,137 Views)
I have been playing around with it some more this morning, and now got it to where I can run the program once and it will work, and then have to stop and start it again.  It has to be how ever NI made the report generator talk to Office.   Brian used this toolkit in college and I was letting him use it for now, but I have another custom library I made up a  years ago before this was available from NI.  I think I am going to have to make a little seminar for the guys on how to use it.

 

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

0 Kudos
Message 3 of 8
(3,128 Views)

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.  

Message Edited by Zinnium on 01-28-2009 01:18 PM
0 Kudos
Message 4 of 8
(3,103 Views)
Ok,  I got is solved.  The damn NI Office toolkit doesn't have a method of disconnecting from the microsoft services.   I went a head and just added a little sub-VI that kills it off when needed.
0 Kudos
Message 5 of 8
(3,084 Views)

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.


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 6 of 8
(3,064 Views)

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. 

 

 

Message 7 of 8
(3,050 Views)

Hi Zinnium

 

Thank you for the feedback and the work around.


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 8 of 8
(3,015 Views)