LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

path for database

Hi,
 
I have an old program, written in LabVIEW 5.1 that uses databases. The database in located in the harddrive on the computer. Now, I would like to move the database to the network. Where do I change the directory path for the database?? I ahve tried to configure the ODBC Data Source Administartor, but I can't seem to get it work. (I have done some changes that onlyu made it worse, by now I can't access the database at all.)
 
Anyone having any ideas?
 
Thank you, Regards
FRida
0 Kudos
Message 1 of 6
(2,687 Views)

I like to store the database information in a *.udl file, this will allow you to reconfigure the database source by double clicking on the file and working through the options.  This is also an easy method for interacting with the DB toolkit in labview where the connect to DB can take a udl file reference.  Storing the database information in a file also allows for dynamic reconfiguring of the database location, type settings . . . without recompiling the application.  I am not sure about LV 5.1 since its been a while since I used that version and no longer have it installed at my facility. 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 6
(2,680 Views)
Hi,


The ODBC Data Source Administrator is the place to do that. The exact way to change it, depends on the database driver (exces, sqlserver, etc.).


I think It's possible that the program doesn't use ODBC, but accesses the database direct to the file. If that's the case, you're in trouble...


Regards,


Wiebe.




"Frida" <x@no.email> wrote in message news:1140612033816-328535@exchange.ni.com...
Hi,
&nbsp;
I have an old program, written in LabVIEW 5.1 that uses databases. The database in located in the harddrive on the computer. Now, I would like to move the database to the network. Where do I change the directory path for the database?? I ahve tried to configure the ODBC Data Source Administartor, but I can't seem to get it work. (I have done some changes that onlyu made it worse, by now I can't access the database at all.)
&nbsp;
Anyone having any ideas?
&nbsp;
Thank you, Regards
FRida
0 Kudos
Message 3 of 6
(2,675 Views)

I think the problem Frida is running into is that the Database Connectivity Toolkit wasn't around for 5.1 (it released with 6.0).  So the only thing we had back then was the SQL Toolkit.  It used third party ODBC drivers from DataDirect (they've changed names at least two times since LV 5.1).  UDL files are not an option because that old toolkit used a CIN to communicate directly to that one specific ODBC driver.  Since I've not used that toolkit nor those drivers for over 5 years, I'm not entirely sure you can change the location of the file in the ODBC Administrator.  I'm also not sure that updating the DataDirect drivers would help because I don't think that old toolkit has been tested with any new drivers.  I'm going to have to defer to others on this list who might be using the old SQL Toolkit and LV 5.1.

 

0 Kudos
Message 4 of 6
(2,661 Views)

I haven't used it for new development in several years but I don't remember ever having problems using the ODC Administrator to change databases.

Frida,

What exactly did you do when you went into the ODBC adminsistrator? Assuming that the existing database was already defined, all that should have beer required was to click on the Select button and browse to the new database location. You should have kept the old data source name. Also, if the old database used a system database (*.mdw file), you should have moved that to the network location and clicked the System Database button to point to that as well. I always mapped a drive to the network location so that's something else you want to check. Also, you should be configuring the database from the System DSN tab. This makes the database accessible for all users.

0 Kudos
Message 5 of 6
(2,650 Views)


@Crystal wrote:

I think the problem Frida is running into is that the Database Connectivity Toolkit wasn't around for 5.1 (it released with 6.0).  So the only thing we had back then was the SQL Toolkit.  It used third party ODBC drivers from DataDirect (they've changed names at least two times since LV 5.1).  UDL files are not an option because that old toolkit used a CIN to communicate directly to that one specific ODBC driver.  Since I've not used that toolkit nor those drivers for over 5 years, I'm not entirely sure you can change the location of the file in the ODBC Administrator.  I'm also not sure that updating the DataDirect drivers would help because I don't think that old toolkit has been tested with any new drivers.  I'm going to have to defer to others on this list who might be using the old SQL Toolkit and LV 5.1.


The SQL Toolkit Connect function has if I remember correctly a string input for connection parameters. It is this connection parameters string that can be used to pass additional parameters to the ODBC manager. The ODBC manager will retrieve possible information intended for its own use, such as the DSN or Driver keyword that can be used to define the Data Source Name or directly a Driver that should be opened and passes the rest to the driver itself for further investigation. This is for instance used for PWD and UID for password and user login to the driver. Other parameters are obviously driver dependant but MS Access for instance supports (and in the case of a direct driver specification to the ODBC manager requires) a DBQ parameter in the form of DBQ="<path to your database file>".
I'm pretty sure ADO's Connection.Open method supports the same or similar additional connection parameters in its connection string.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(2,637 Views)