saprouzy Posted August 3, 2005 Share Posted August 3, 2005 (edited) suppose i have this:Set cnBIL = New ADODB.ConnectionWith cnBIL .ConnectionTimeout = 500 .ConnectionString="uid=SQL_BLA;pwd=SQL_BLO;server=SQLserv;driver={SQL Server};database=TEST;dsn='SQL_TEST';" .CursorLocation = adUseClient .OpenEnd Withthe program would crash if the dsn SQL_TEST isn't set in the user or system datasources list (working under wnidows 2000 it can be found under Administrative tools". so what i want is a way to create the dsn from vb, so that i don't have to set it for each person who's gonna use the application.i hope i made the problem clear.thanks for the help Edited August 3, 2005 by saprouzy Link to comment Share on other sites More sharing options...
dman Posted August 6, 2005 Share Posted August 6, 2005 (edited) Rather than creating a dsn, try using a dsnless connection. You pass all connection info as as string in your code. To create your connections, create a text file and name myconn.udl. Then in properties set all of the correct parameters and save it, then open in text editor to get the connection string that you will use in your code. google "ado dsnless connection" for more info.you could also set the connection to use the .udl file itself and include it in your install. Edited August 6, 2005 by dman Link to comment Share on other sites More sharing options...
saprouzy Posted August 8, 2005 Author Share Posted August 8, 2005 (edited) i made a module to create the dsn'sbut ur idea of dsnless connections is interestingi'll look into it, does it affect speed in any way?thanks Edited August 8, 2005 by saprouzy Link to comment Share on other sites More sharing options...
dman Posted August 8, 2005 Share Posted August 8, 2005 Has no effect on speed, just a different way of passing connection info that makes deployment easier. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now