LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access MS Access database on remote computer (shared folder)

Solved!
Go to solution

Hello,

 

I need some help.

 

I've made a program and it works fine on my computer, but multiple users will be using program simultaneously, each one on his own computer conected over local network to mine computer (database is on my computer in shared folder). 

 

When I try to access data on database (path is path of shared folder) i'm getting error 5013 (no database). The problem occurs only when I'm trying to read something from MS access database but not if I try to read data from .txt file, then it works fine...

 

I'm using ADO Tools

 

Can someone help me, I would be very greatful?

 

🙂

0 Kudos
Message 1 of 9
(10,411 Views)
What you are trying to do will not work -- or at least not work very well. Jet (the underlying DBMS) is not intended to be multi-user. To do that you need a more capable database. Microsoft and Oracle both have free versions of their enterprise products. Either one will work well as long as you don't plan on having more than 4G-bytes of data

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 9
(10,392 Views)

Thank you for reply, but I think I explained wrong. 

 

The situation is like this:
We have 5 computers on network and on one computer is ms access archives file (archiver.mdb) in shared directory (other computers have access to that directory). I was planing to install executable on each computer and have access to that archive from witch ever computer I desire... I've done some research and I found that is posible to achive this with ODBC, but I do not know how to do or implement ODBC in my code... Can you or anyone help me with this?

0 Kudos
Message 3 of 9
(10,364 Views)
Solution
Accepted by SuperbrainBug
Your code will have a connection string that specifies the odbc driver or your code will have a dsn that specifies the odbc driver or your code will point to a udl file that specifies the odbc driver. You don't need to concern yourself with the details of the driver itself.

I'll also echo what mike said about the jet database. It is poor choice for multiple clients. You can use a jet db to debug the table design and the sql queries if you wish but you should move to a more robust db such as SQL Server or MySQL.
0 Kudos
Message 4 of 9
(10,354 Views)

OK, is there any example how to do that? 

0 Kudos
Message 5 of 9
(10,340 Views)
It depends on what you are using. Is it the Database Connectivity Toolkit from NI? Show what you are using now.
Message 6 of 9
(10,325 Views)
The first step in the process is to identify an instance of a networked DBMS that you can use. Talk to your corporate IT and see if they can help. A multiuser is not a trivial thing to create.

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 7 of 9
(10,323 Views)
Solution
Accepted by SuperbrainBug

Thanks to you Dennis I've managed to figure it out.


I'll explain this for future generations 🙂

 

1) I've created DSN. To do that open ODBC Data Source Administrator:

- for 64 bit app C:\Windows\System32\odbcad32.exe

- for 32 bit app C:\Windows\SysWOW64\odbcad32.exe

 In System DSN tab click Add.. then choose Microsoft Access Driver (*.mdb) (If you do not have this on list download that drivers from web) --> FINISH.

Enter Data Source Name (mine is Test2) --> Select... --> now because the MS Access database is on shared folder on remote PC go to Network... --> Browse... and select that shared folder --> Finish. Now you'll see all .mdb files on that folder and you choose your database --> OK --> OK --> OK

 

2) Now in block diagram you connect string "DSN=your_dsn_name;" (mine was Test2) to ConnectionString connector of ADO Connection Open.vi

 

It worked for me.

 

Pis

0 Kudos
Message 8 of 9
(10,306 Views)
I'm not familiar with the toolkit that you are using but it is much simpler to deploy when you use a UDL file or have the connection string in the VI.
0 Kudos
Message 9 of 9
(10,287 Views)