LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database Toolkit Sub query Syntax and file path expectation question.

I need some assistance from those of you smarter than I. 
 
I have two database files (not two tables in the same database file) one represents information delivered from an external interface, and the other is used by the internal interface associated with the processing half of my application.  Data is received (i.e. fields are populated)  from the external interface to one database file and that data is then copied to another database file where the information will be processed by the internal interface. This is being done because I am worried about  file access issues that might occur if two different interfaces (external & internal) try to access the same file at the same time (without dealing with semaphores). I am not too worried about the sanctity of the data since each record supplied from the external interface should not effect any of the data being used by the internal interface.  So the first question is , am I being to primitive in my thinking assuming that I would run into file access issues if I were to just use two tables in the same database file for the same purpose ?
 
My second question is related to my current implementation where I have two separate database files representing the external and internal interface data. Currently when a new set of data is entered into the External Interface Database file, an alert is issued, and another task copies the data from that file into Internal Interface Database, then the data is deleted from the External Interface Database file. My question is related to the syntax that I am using to provide the described functionality. I am currently using a INSERT with a subquery to the External Interface Database file i.e. INSERT INTO InternalDB FROM  ExternalDB.ExternalTable WHERE Order =  '06306049'; .
My question is when I run this query with both database files in same directory I get an error stating that the ODBC driver can not find the ExternalDB.ExternalTable in the Parent Directory of the subdirectory where the files are actually located. The system DSN is set up correctly for the ExternalDB, and if I move it to the parent directory the query works correctly, my question is why would I have to put the two database files in seperate directories for this to work and is there a way to avoid this ?
 
Thanks..
Brad W
0 Kudos
Message 1 of 5
(2,486 Views)
Ohh and this is in reference to the LabView SQL ToolKit and LabView 8.2
0 Kudos
Message 2 of 5
(2,485 Views)
Hi Grep123,
 
I tried to find some documentation on this subject, but couldn't find any.  Could you post a picture of the error, just so the wording is exact.  Thanks.
Brian K.
0 Kudos
Message 3 of 5
(2,453 Views)
Thanks for responding Brian -
 
The message I get is Error Code -2147467259
Conn Execute.vi->InsertIntoFrom.vi<ERR>Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access Driver] Could not find file 'C:\Project\APDSS\DataBase\ExternalInterface.mdb'. in Conn Execute.vi->InsertIntoFrom.vi
 
When my query looks like
INSERT INTO InternalInterface SELECT Field1, Field2 FROM ExternalInterface.ExternalTable WHERE Id = '065649-101-750';
0 Kudos
Message 4 of 5
(2,444 Views)

Hi grep123,

Is it possible that it has something to do with the attached KB:

http://digital.ni.com/public.nsf/websearch/6F0A918BEA7C895686256EA900737F59?OpenDocument

Just to make sure are you using Microsoft Access?

Brian K.
0 Kudos
Message 5 of 5
(2,435 Views)