Store the connection string

Results 1 to 2 of 2

Thread: Store the connection string

  1. #1
    Marco Cioffi Guest

    Default Store the connection string

    Dim MyConnection<BR>Set MyConneccion = Server.CreateObject("ADODB.Connection")<BR>MyConne "test"<BR>...<BR>...<BR>This is the simple connection (that i must to write in every asp page)but...<BR>...<BR>For improve performance is correct to store a connection string into:<BR><BR>1.Application("MyConnection")<BR><BR> 2.Session("MyConnection")<BR><BR>3.The first code (Set MyConnection=Server.CreateObject(...)<BR><BR>????

  2. #2
    Join Date
    Dec 1969

    Default RE: Store the connection string

    You can store the connection *STRING* in either Application or Session values. Sure.<BR><BR>But in your example, the connection STRING is simply "test" (presumably, the name of the DSN).<BR><BR>You *MUST NOT* store a connection *OBJECT* in either Application or Session scope. Period. If you care a lot about "why", go look in and the pages on performance, et al. I *believe* that Charles has some good stuff there on this topic.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts