4

When using classic ASP, what is the difference between declaring connection via object tag:

<object RUNAT="Server" ID="cn" PROGID="ADODB.Connection"></object> 

and declaring the connection via the Server.CreateObject() call:

set cn = Server.CreateObject("ADODB.Connection")

Or is there any difference? Performance, memory, etc..

Joel Coehoorn
  • 362,140
  • 107
  • 528
  • 764
slolife
  • 18,415
  • 19
  • 75
  • 116

1 Answers1

1

The object method should perform better, because the object is first created when you start using it.

I found some articles, maybe they give you some insight:

http://www.aspmessageboard.com/showthread.php?t=6775

http://www.asp101.com/tips/index.asp?id=4

BenMorel
  • 30,280
  • 40
  • 163
  • 285
vLX
  • 103
  • 6