LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Write to a database in a network

Solved!
Go to solution

I have a program that reads and writes data to a database it works OK as long the data base is located in the local PC where the program is executing. I wrote the program so I can set up by changing the ini file. In the ini file I indicate the path to the data base also what UDL to use.

I have checked the vi, it opens the connection ok but when it goes thru the loop and goes and executes the SQL it comes out with  error

-2147217900 and he vi stops working. I change the ini file back to the original setup and work fine. I forgot to mention that a copy of the Access database is in the local PC and another is in a network drive which the pc has access to. I made a UDL I veryfied that the connection works it come back test OK. I am  using the database connectivity VIs. I amusing LabView 10.

0 Kudos
Message 1 of 4
(2,434 Views)

The Access driver does not support networked access, as it is entirely file based. For real network access to the database you would need to use something more professional like Oracle, MySQL, SQL Server or similar. Those databases are server based and get accessed through various network protocols.

 

The only thing that will likely work is to map the remote directory where your Access mdb file is located into a local drive and access it in that way.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,422 Views)
Solution
Accepted by topic author Toro

Well, it took a bit but fortunately I was able to figure it out, actually Microsoft did it. I create a new ULD using the Microsoft Office 12.0 Access Database Engine OLE DB Provider. It lets me select the location of the data base. I still used the same VI I had been using without making any changes to it. I use the Database Connectivity VI. I can read and write to the database.

0 Kudos
Message 3 of 4
(2,390 Views)

Sorry, I meant UDL.

0 Kudos
Message 4 of 4
(2,389 Views)