• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ODBC driver and DSN

 
Amruta Agarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
O/S Windows XP Prof
ODBC driver is used for talking to a ODBC database or ODBC datasource.
For that we create a DSN, which could either be a system or a user dsn.

Now the question is when should a system dsn be created and when should a user dsn be created.
Also the drivers shown as choices are the installed with windows or does one have to obtain the driver himself?

Thanks and Regards,
Amruta.
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Amruta,

I've always used System DSN, it applies for all users of a PC.
(just look at the text just above the "OK", "Cancel" etc buttons)

I've also always used the default drivers that Microsoft offers.
If your database has only 1 concurrent user, and you only need old JDBC features this will probably do.

Herman
 
Jeff Ash
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good rule of thumb on the System/User DSN issue is that if the application is running as a user other than the one you are logged in as (i.e. in the case of a Web server or other Windows service), then you must use a system DSN. Otherwise, a user DSN will work. However, like the other reply said, a System DSN will always work.

The main reason to use a user DSN is when you want to limit access to a particular DSN configuration to a particular user. This is when a user DSN should be used instead of a System DSN.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"alwaysnewbie",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by alwaysnewbie:
P.S. I have posted my question in this thread as the subject was appropriate, even though the question is off track from the above one. Sorry if I have misdirected this thread.


This is known as a thread hijack and is not allowed. Please post your question in your own newly created topic, after you change your display name as directed.
[ May 20, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic