cdh wrote:
> Hey I was attempting to do a simliar feat. I have set up a system DSN
> using the ODBC adminstrator to connect to my external mySQL server
(across the Internet). My current method to use the Open DB connectivity
VI is to use set prompt = true and manually enter the information reffering
to my system DSN. Is there another way to point to this DSN (ideally w/
prompt = False)?
Well LabSQL uses ADO and I assume you use the myODBC driver to connect
trough ADO to mySQL. As such you are ultimately going through the ODBC
manager at some point and the ConnectionString property of the
Connection object can define all the settings an ODBC user would specify
to connect.
At
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdrefodbcprovspec.asp
the syntax of the ConnectionString is defined. If you set this property
of the Connection refnum before you issue the Open method call and leave
the parameters of the Open call all empty the connection will be made
with the parameters from the connection string. In addition to any ODBC
driver specific attributes you can define following attributes in the
connection string:
"[Provider=MSDASQL;] { DSN=name | FileDSN=filename } ;
[DATABASE=database;] UID=user; PWD=password"
The provider attribute can be omitted since this is the default ADO
provider.
Alternatively you can skip the entire DSN setup by specifying directly
all necessary parameters as attributes:
"[Provider=MSDASQL;] DRIVER=driver; SERVER=server;
DATABASE=database; UID=MyUserID; PWD=MyPassword"
Just add myODBC specific attributes to the end of these strings if
necessary.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390