|
Posted by kk035 on 02/17/07 15:19
On 17 Feb., 15:55, Erland Sommarskog <esq...@sommarskog.se> wrote:
> (k...@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, esq...@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
It seems that it does not wait for 15 seconds - it returns at once.
The password is hard coded. Changing to SQLNCLI doesn't change
anything. Using the same ASP-application on a remote IIS without
changing anything works fine. Using a wrong password in the ODBC-
Configuration to get additional configuration options produces an
entry in the error log of the SQL-Server, which tells that the
password is wrong. Using a wrong password in the DSN for the ASP-
application does not result in an error log entry.
Navigation:
[Reply to this message]
|