02-22-2006 06:35 AM
02-22-2006 07:20 AM
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.
02-22-2006 07:40 AM
02-23-2006 09:25 AM
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.
02-23-2006 09:40 AM
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.
02-24-2006 05:08 AM
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>".
@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.