LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open connection method

Hello everybody.

I have a problem with the "open connection" method, and I don't know if it is LabVIEW related.
In our program, we open a connection with a database with this method. We have a problem if prior to open the connection, we have showed the file dialog box to choose a new file, and the user has choosed to create the file in the floppy disk. I don't know why, when the program flow arrives at the method "open connection", it tries to read the floppy disk, and if it has been removed, we have an error: "Exception occured in Microsoft JET Database Engine, Disk or Network Error.. in floppy.vi". It only happens if I use a *.udl to find the database, if I use a *.dsn, it does not happen.
Why does it try to access the floppy?. It do
es not happen if we let the user choose the directory (he can choose the floppy) but we don't let him choose the name of the file (in the "file dialog.vi" we choose "existing dir" instead of "new file", and we assign a name to the file in the program).
If the user has choosen to create the file in the hard disk,or in another media that has not been removed, everything goes fine. I have not checked it, but I guess that if the user choose a network computer as destination of the new file, and when we try to open the connection to the database, the computer is not available, the error would be the same.

Can anyone help me with this?

I attach a file: floppy.vi.
In order to check what I have tried to explain, follow the next steps:
- Run the vi
- When the dialog box appears, insert a floppy disk and choose to create the file in the floppy
- When the file has been written, remove the floppy disk
- Then, push connect, and you will see that the program tries to access again to the
floppy disk when the open connection method executes
0 Kudos
Message 1 of 3
(2,774 Views)
I got the same response when I run your vi. However, I'm not sure if the error is due to the floppy. In the construct that I'm familiar with, one needs to use the ODBC Data Source Administrator to set-up DSN first.
0 Kudos
Message 2 of 3
(2,774 Views)
I did not have any error when I used a *dsn file. Only had it when I used an *udl. Anyways, I crate both with the ODBC Data Source Administrator, and when I test the connection with the Administrator I got the message "Test connection succeeded".

Any other ideas? Thanks in advance.
0 Kudos
Message 3 of 3
(2,774 Views)