LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC & Access on different computer

Hi
 
I've got a slightly annoying problem. I have an access database, which is read by a vi which I have created. This works perfectly on my laptop. However I have then moved the database and vi over to another PC. I have created a new dsn linked to the database, and if i test the connection in the ODBC dialog it says 'test succesful'. However when I run the vi it doesn't extract any data from the database and doesn't report any errors.
 
Help would be much appreciated as this is driving me mad!!!
 
Cheers
 
Dave
0 Kudos
Message 1 of 17
(4,175 Views)
Hi Dave
 
That does sound a bit wierd. Has mdac been installed on the new PC? I think its there by default in Windows but I thought it was worth asking.
 
David
 
0 Kudos
Message 2 of 17
(4,166 Views)
Maybe this sounds a little stupid: du you use the correct odbc-name or dsn-path respectively?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 17
(4,162 Views)

Hi

I'm assuming that mdac is present as the ODBC driver appears in the odbc administrator. I've tired specifying the database by file, system and user dsn's . These have been done both by the address of the dsn and also using the prompt in Labview. I don't understand why it also test succesfully but no data is passed.

Cheers

Dave

0 Kudos
Message 4 of 17
(4,159 Views)
Is there an error? Or does it work "properly" just without giving you data?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 17
(4,156 Views)
It runs through the loop in the program, but doesn't extract any data. No errors are produced. The vi is stripping data from the database and writing the data to a series of files. The files are produced but only with headers and no actual data in them.
 
Cheers
 
Dave
0 Kudos
Message 6 of 17
(4,148 Views)

Hi David

Are you using a specific toolkit within LabVIEW to extract the data from you Access database? Have you tried accessing another database using your LabVIEW program?
I know this sounds stupid but it sounds as if there is no data in your database. I suggest you either try using another database and see whether it works properly or try using one of the shipping examples with your database and see whether they work.

It does sound as if something on your PC is missing that you orginally had on your laptop

Let me know you get on

Kindest Regards

YatinM
NIUK & Ireland

Message 7 of 17
(4,124 Views)
Hi
 
I'm using the database connectivity toolkit and SQL queries to extract the data. The database I'm using on the desktop is a copy of the one off the laptop, I've opened it in access on the desktop and the data is there and I can edit it.
 
I've attached the vi I am using.
 
Cheers
 
Dave
 
 
0 Kudos
Message 8 of 17
(4,107 Views)
So do you have both LabVIEW and the Database Toolkit installed on both the laptop and the desktop?  Do any of the Database Toolkit examples work?


0 Kudos
Message 9 of 17
(4,090 Views)

Hi

Yes the toolkit is installed on both machines.

I've just tried running the database example 'Fetching example.vi' from the 'databaseex.llb' library and this works with UDL. I've also tried deleting the UDL reference and replacing this with a dsn and that also works. I knwo the vi works on the laptop so it should work on the desktop. I've copied the access database from the laptop to the desktop. Do i eed to register its exsitence somewhere apart from in the dsn?

 

Cheers

 

Dave

0 Kudos
Message 10 of 17
(4,080 Views)