Reply to Re: Connecting Sql Server 2005 on Windows 2003 using ASP local

Your name:

Reply:


Posted by Erland Sommarskog on 02/17/07 14:55

(kk035@hotmail.com) writes:
> It's just an internal application without any performance problems.
>
> strConnect="DSN=ODBC-datasourcename;UID=username;PWD=password"
>
> code snippet:
>
> set conDb = Server.CreateObject("adodb.connection")
> conDb.Open Session("strConnect")
> for each errDb in conDb.Errors
> if errDb.Number <> 0 then
> bDbError = true
> Session("strErrTxt1") = errDb.Description
> Session("strErrTxt2") = errDb.Source
> Session("strErrTxt3") = errDb.SQLState
> Session("strErrNbr1") = errDb.Number
> Session("strErrNbr2") = errDb.NativeError
> exit for
> end if
> errDb.Clear
> next
>
> -> err.Db contains no information

But what happens? Does it wait for 15 seconds and give up? Or does attempts
to use the connection fail?

And why use a DSN? Personally, I've never liked DSNs, it just one more
source of error. What is in that DSN?

What happens if you change the DSN part to Provider=SQLNCLI?

Where does the password come from? Is it hard-coded into the
application, or user-entered? Keep in mind that in SQL 2005, passwords
are always case-sensitive.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация