Global.asa and objects

Results 1 to 2 of 2

Thread: Global.asa and objects

  1. #1
    Join Date
    Dec 1969

    Default Global.asa and objects

    I&#039;m getting the following error<BR><BR>Invalid Scope in object tag <BR><BR>global.asa, line 1 <BR><BR>The object instance &#039;rstActiveUsers&#039; cannot have Application or Session scope. To create the object instance with Session or Application scope, place the Object tag in the Global.asa file. <BR><BR><BR>From this coding at the top of the global.asa<BR>&#060;object runat="Server" scope="Application" id="rstActiveUsers" progid="ADODB.Recordset"&#062;<BR>&#060;/object&#062;<BR><BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default Recordsets can't be global...

    ...if they have the wrong threading model. Which I presume they do, from the error you got from trying it.<BR><BR>Hmmm...but it says it can&#039;t have Session scope, either. And even though it&#039;susually a bad idea to put a recordset at Session scope, I know it *can* be done.<BR><BR>What are you trying to accomplish? Why a recordset?<BR><BR>Did you try it the more conventional way?<BR><BR>Sub Application_OnStart<BR> Application("ActiveUsers") = Server.CreateObject("ADODB.Recordset")<BR> ...<BR>End Sub<BR><BR>???<BR><BR><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