• 0

DSN vs Connection string


Question

OK I have programmed applications that use a DSN for the database connectivity, and I have also used plain connection strings with IP address for database connections.

What are the difference, benefits of one over the other?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Can depend on what web server you are running. It is posible, if the permissions are wrong to download the file with the connection string in.So a hacker could get your database username and password.

I would use DSN + ODBC personally.

Link to comment
Share on other sites

  • 0

No hehe, he means DSN - Data Source Name. You basically setup database sources that can be authorized for access, whether they be file DSNs, or system DSNs. Personally I've always used connection strings, as the sites i've worked on have been intranet (so they are already protected and local). However i think the need occurs when there is an access problem.

For example if you are utilizing a database within your company network that is outside your division (i.e. on a server somewhere else) and that has restricted access, then they will need to set up a DSN to provide your site access to the database.

In most cases, however, the database is local and you do not need to authorize yourself.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.