LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Library not found or failed to load

I tried the instructions according to (http://zone.ni.com/reference/en-XX/help/371361J-01/lverror/edlibnotfound/) but it still doesn't work.

 

The error list says:

 

The library specified for this node cannot be found or cannot be loaded. Right-click the Call Library Function node and select Configure, then choose the correct library name or path.

 

Which I did. The path is correct, the library is present but I see the same warnings when I open the 'missing' library. I don't see any question marks in the block diagram either.

 

The VI I am trying to download is from (http://performancemicrowave.com/sql_LV.html). Another problem is that when I open the vi, this thing pops up:

 

The program can't start because LIBMYSQL.dll is missing from your computer. Try reinstalling the program to fix this problem.

 

So I downloaded mysql, Connector C package, and libmysql.dll then tried again but it still gives the same problem as well.

 

Can you help me get this thing to work?

0 Kudos
Message 1 of 7
(5,013 Views)

Well, first thing is that this library is completely unnecessary. There is a free package that will give better performance and doesn't require any special DLL.

 

Check out the discussion, and the link to download the 2012 version of the VIs is on the last page.

 

The drivers utilize the standard ADO interface so all you need extra are the ADO (also sometimes called OLEDB) drivers for the DBMS you are using. For MySQL there are a couple different versions, but they all should work.

 

Whoever is responsible for that site really should take it down. Its doing nobody any good.

 

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 7
(4,986 Views)

I tried downloading it and when I opened it, I get these error messages:

 

Error Code -2147467259

Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in ADO Database Drivers.lvlib:Open Connection+.vi

 

Error Code -2147467259

Exception occured in ADODB.Recordset: The connection cannot be used to perform this operation. It is either closed or invalid in this context.Help Path is C:\Windows\HELP\ADO270.CHM and context 1240658 in ADO Database Drivers.lvlib:Open Recordset+.vi->ADO Database Drivers.lvlib:Insert BLOB data.vi->ADO Database Drivers.lvlib:_Database Driver Catalog.vi

 

It seems like the same problem I've been having with the other VI's. It could be that the VIs are fine but LabVIEW can't find it. What am I supposed to do?

0 Kudos
Message 3 of 7
(4,973 Views)

Ok, once you have the LV VIs for interacting with ADO, you need the ADO-compatable for the specific DBMS that you are using - in thie case MySQL. Those you can download from here.

 

Now run the installer that you just downloaded and restart your computer, whether it asks you to or not.

 

Once you have restarted you only need one more thing: the connection string. Because ADO can work for nearly any database, you need someway to tell ADO what database you want to connect to - which is what the connection string does. For MySQL, you use a string that is in this format:

 

Provider=MySQLProv;Data Source=mydb;User Id=;Password=;

 

The first part (Provider) tells ADO which driver to use, in this case MySQLProv points to the drivers you just installed, so don't change that.

 

The second part (Data Source) tells the driver you just identified, which specific database you want to connect to. The reason for this field is that a single instance of the MySQL server can manage many different databases. In fact the relationship between the MySQL server and its databases is basically the same as the relationship between Microsoft Word and a letteryou wrote with it. A database is in essence a type of document that you create and manage using MySQL - which is properly called a DBMS (DataBase Management System) not a database. So here you need to replace the string mydb with the name of the database you want to access.

 

The third and fourth parts go together. MySQL requires you to provide a user ID and a password. Typically these values are unique to each database, but they don't have to be. If you don't know what those values are, talk to the person who setup the database in the first place. As you would expect you replace myUsername with the user ID you want to use and myPassword with the password associated with that user ID.

 

With all this in place you should now be able to at least connect to the database. Of course you still need to know what you want to do, but that is all about a language called SQL, which can be the topic for another message.

A couple final points:

  1. These instructions assume that the MySQL database is running on the same computer that you are running LV on. If it is running on a different computer and you are accessing it over the network, that is a bit different.
  2. They also assume that the database server is running. If you installed MySQL by itself, the default is for it to be installed as a service that starts up automatically when the computer boots. But this isn't a guarantee.

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 4 of 7
(4,940 Views)

Could you please give me directions for postgreSQL? I'm using pgAdmin III. I've already downloaded ODBC. My available drivers is PostgreSQL Unicode (x64).

 

I tried your MySQL instructions just in case, but they didn't work. I got this error again:

 

Error Code -2147467259

 

Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name too long in ADO Database Drivers.lvlib:Open Connection+.vi

 

I tried the same thing with a couple different connectivity vi's including the one you posted but they all run into the same problem.

0 Kudos
Message 5 of 7
(4,911 Views)

You are trying to access a **PostgreSQL** database? That would have been helpful to know. Can you please post you code? Looking at the error messages you are getting, you seem to be changing what the code is trying to do between tries.

 

Also, where did you get your drivers?

 

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 6 of 7
(4,902 Views)

I got the odbc from:

 

http://www.postgresql.org/ftp/odbc/versions/msi/

 

I'm not sure what you mean by code, but assuming you're referring to the Connection String, I'm just putting in:

 

postgresql://username:password@host:port/pgsql

based on this format:

//$dsn = "<driver>://<username>:<password>@<host>:<port>/<database>";

 

for all the connection vi's I've been trying. They don't have a section where I can put in each information in separately. I guess there's a box for ADO Version, but the problem was that the DSN was too long.

0 Kudos
Message 7 of 7
(4,888 Views)