By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,460 Members | 1,508 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,460 IT Pros & Developers. It's quick & easy.

create odbc connection on the fly

P: n/a
Hi,

I posted earlier about beeing able to find an SQL server database through
code and someone was kind enough to help me out(thank you Scott). I now
have another question;

My app was written using odbc because of the need to install the program and
use different databases depending on what the client has/owns. I now need
to create an ODBC connection string during installation.

This is the connection string generated by VS.NET 2003;

"Trusted_Connection=Yes;DSN=TransactionSQL;UID=Adm inistrator;DATABASE=Transa
ctions;APP=Microsoft® Visual Studio .NET;WSID=FLOATER99;Description=SQL
Server Transaction DataBase"

I'm trying to make sense of this string.
Trusted connection = no password needed for this connection
DSN = Needed because this is an ODBC connection
UID = User ID
Database = the actual name of the Database
APP= the app using this connection
WSID = Work station ID
Description = The description I wrote when creationg the DSN

My Question is about the DSN. Do I NEED it? What does this actualy contain?
is it text? Can I create it during install(setup program)Where is it normaly
located when created by VS.NET? Does MS have some kind of utility that can
help me setup this connection?

I thank you in advance for *any* input.

Regards,

Marco
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hp
You can create dsn from ODBC manager - manually. In setup program you can create dsn using modifying registry or thru odbc apis. However, easiest way is to create dsnless connection.
Nov 15 '05 #2

P: n/a
Thanks HP,

You were right, dsnless was the way to go. I found an example of it and it
works beautifully.

regards,

Marco
"hp" <an*******@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
You can create dsn from ODBC manager - manually. In setup program you can

create dsn using modifying registry or thru odbc apis. However, easiest way
is to create dsnless connection.
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.