01-06-2007 04:36 PM
01-07-2007 02:19 AM
You should consider whether the users really need to have access to the DB.
Generally, users do not interact with databases, only programs or administrators.
What you might want to do is have a single user\pass which your program will use to connect to the DB (this you can do from the Open Connection VI) and have a table inside the DB which will hold user account data such as name, password and level. The program will use those settings to allow users access.
The user\pass connection to the DB can either be hardcoded in your code or written to an ASCII configuration file, which is much simpler and less problematic than working with Excel (see the File palette for the config file VIs). The path to the config VI can be hard coded relative to where your VI/exe is (just note that when building, the EXE itself is usually considered to be a folder).
If you want the user name and password to be protected, you should probably use some sort of encryption to protect them. If you have LV 8.x, you should have an MD5 VI built in. If not, you can find one in one of the OpenG packages (which are a recommended download, anyway).
If you still want an answer, you can also use the config file VIs to store the path to your Excel file, although I would strongly advise against using that method (since, for example, Office interfaces tend to change between version and installing a different version of Excel could make your program not work).