Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why we use DNS-less Connection?

Status
Not open for further replies.

hxx

Technical User
Oct 26, 2000
10
MY
Whenever, i make connection to the database through ADODB.Connection, there is an error saying that i've mispelled or my db is not found. However, when i use dsn-less connection, there is no problem. Why? I also would like to know about what is the advantages of using dsn-less connection.
 
perhaps your DNS name isnt set up correctly, check your ODBC32 settings in the control pannel, you have to make sure the DNS name exist, and that it's pointing to the right information.
Karl
kb244@kb244.com
Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)

 
We use a DSN-less Connection so when we write distributed Visual Basic Applications we do not have to set up a DNS on every client machine. It is not as big of a deal when working with ASP because that would require only one DNS setup but that is still an extra unnecessary step.


Wushutwist


Sun Certified Java 2 Programmer
 
If you use the native OLE Db Drivers you are presented with greater access to native functionality within the RDBMS. The drivers alos give better performance than the corresponding ODBC drivers. THe only anomolly in this is Oracle where it is sometimes preferable to use the ODBC driver than the native OLE DB driver.

In ASP if you are using Access and may move the site from one ISP to another or use the same ASPs on multiple sites then the use of a DSN-less connection makes the code more portable through the use of
Code:
Server.MapPath

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top