Recordset.ActiveConnection
Recordset.ActiveConnection
am 30.11.2004 02:38:08 von wing0508
Dear All Expert,
I am facing a problem now.
I have two web-based application A and B, which using ASP and MS SQL2000 to
implement.
Sometime, I can login project A, but cannot login project B, the different
between the connection of two projects are:
in project A
I am using ADODB.Connection object, then using ADODB.Recordset object to
retrieve resultset
in project B
I am only using ADODB.Recordset with using its ActiveConnection = String to
retrieve resultset
Does it will make project B cannot connect to database sometime??
Thanks~
Re: Recordset.ActiveConnection
am 30.11.2004 04:13:55 von ten.xoc
Why are you using ADODB.Recordset in either case?
I always:
(a) use ADODB.Connection
(b) open a connection using conn.open "connection string"
(c) open objects against that connection, e.g.:
set rs = conn.execute("query")
No need to create ADODB.Recordset or worry about the ActiveConnection and
whether it is valid, dealing with problems when the connection is opened but
the recordset bombs out, etc. etc.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Utada P.W. SIU" wrote in message
news:e21#8zn1EHA.3596@TK2MSFTNGP12.phx.gbl...
> Dear All Expert,
>
> I am facing a problem now.
>
> I have two web-based application A and B, which using ASP and MS SQL2000
to
> implement.
>
> Sometime, I can login project A, but cannot login project B, the different
> between the connection of two projects are:
>
> in project A
> I am using ADODB.Connection object, then using ADODB.Recordset object to
> retrieve resultset
>
> in project B
> I am only using ADODB.Recordset with using its ActiveConnection = String
to
> retrieve resultset
>
> Does it will make project B cannot connect to database sometime??
>
> Thanks~
>
>
>
Re: Recordset.ActiveConnection
am 30.11.2004 13:08:42 von reb01501
Utada P.W. SIU wrote:
> Dear All Expert,
>
> I am facing a problem now.
>
> I have two web-based application A and B, which using ASP and MS
> SQL2000 to implement.
>
> Sometime, I can login project A, but cannot login project B, the
> different between the connection of two projects are:
>
> in project A
> I am using ADODB.Connection object, then using ADODB.Recordset object
> to retrieve resultset
>
> in project B
> I am only using ADODB.Recordset with using its ActiveConnection =
> String to retrieve resultset
>
> Does it will make project B cannot connect to database sometime??
>
> Thanks~
Using an implicit connection (setting ActiveConnection to a string) will
prevent session pooling (which used to be known as ODBC connection pooling)
from working. This can cause your SQL Server to be flooded with too many
requests, especially if your website attracts a lot of users/activity. See
this: http://support.microsoft.com/default.aspx?scid=kb;en-us;3284 76 and
this: http://msdn.microsoft.com/library/en-us/dnmdac/html/pooling2 .asp
Always use an explicit connection object.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: Recordset.ActiveConnection
am 30.11.2004 14:42:29 von reb01501
Bob Barrows [MVP] wrote:
>
> Using an implicit connection (setting ActiveConnection to a string)
> will prevent session pooling (which used to be known as ODBC
> connection pooling) from working. This can cause your SQL Server to
> be flooded with too many requests, especially if your website
> attracts a lot of users/activity. See this:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;3284 76 and
> this:
> http://msdn.microsoft.com/library/en-us/dnmdac/html/pooling2 .asp
>
> Always use an explicit connection object.
>
Actually, I meant to cite this article:
http://support.microsoft.com/?kbid=271128
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Recordset.ActiveConnection
am 01.12.2004 03:04:46 von wing0508
Hehe~~
Because that code is not programmed by me
I always using ADODB.Connection to make connection
However, my colleague using ADODB.Recordset's ActiveConnection to make
connection in that project and now he is left
And the the sql server is always hanged (sometime just hanged the project's
database, other project can run smoothly) after his project start running
So I investigate his code and found he was using ADODB.REcordset to make
connection. I think it is a problem, so ask heres' expert
^.^