Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
BeamBrain
Starting Member
10 Posts |
Posted - 2008-04-22 : 13:24:23
|
I have an application written in classic asp which connects to a sql server 2005 db. I have 2 procs to open and close the db as followsCode: ( text )Dim strConnDim oConn sub OpenDataConnection()set oConn = CreateObject("ADODB.Connection") strConn = "Provider=SQLOLEDB; Data Source = xxx; Initial Catalog = xxx; User Id = xxx; Password=xxx" oConn.Open strConnend sub sub CloseDataConnection() oConn.Close set oConn = nothingend subI'm trying to understand the difference between doing this...OpenDataConnection()set rsID = CreateObject("ADODB.recordset")searchPhrase = "SELECT blah"rsID.Open searchPhrase, strConnrsID.closeCloseDataConnection()and this...OpenDataConnection()set rsID = CreateObject("ADODB.recordset")searchPhrase = "SELECT blah"rsID.Open searchPhrase, oConnrsID.closeCloseDataConnection()i.e. using oConn instead of strConn. I've just changed everything to oConn from strConn but site performance seems to have dropped off considerably. fyi, i'm also trying to make the best use of connection pooling but this may not be relevant here. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-04-22 : 13:43:44
|
Since this isn't a SQL Server question, I'm moving your post to the ASP forum.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|