Passing COM objects between pages

Results 1 to 3 of 3

Thread: Passing COM objects between pages

  1. #1
    Nair Guest

    Default Passing COM objects between pages

    Is there any way i can pass COM objects between pages<BR><BR>This is what i want to do<BR>Eg. I have an ASP page Login.asp<BR>which calls the program ResultLogin.asp<BR>in resultLogin.asp<BR>i have<BR>dim PQR<BR>set PQR = server.createobject("objABC.OBJABC")<BR>PQR.load ("username","Passwd",PQR)<BR><BR><BR>now PQR contains<BR>PQR.FNAME<BR>PQR.LNAME<BR>etc, etc<BR><BR>This Resultlogin.asp redirects the page to say<BR>common.htm.<BR>I would like to access the PQR object there <BR>is there any way i can do that<BR><BR>I am not a good ASP programmer, could any one help me with examples<BR><BR>Thanks<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Passing COM objects between pages

    As a rule NEVER pass objects between pages...always create the object on each page...pass ONLY the information you will need to create the object on that page

  3. #3
    Nick Ward Guest

    Default RE: Passing COM objects between pages

    I have one of those problems that seems to fit it to what you want as well....<BR>I&#039;m using the MSCW nextlink component to link through to different pages listed in some text files. <BR>I have 2 products that belong to different categories so in one page there is a product with a ?value=10 and when the product is listed in another page under a differnt category it might be ?value=20 <BR>So the code goes <BR>Dim MySlides <BR> Set MySlides=Server.CreateObject("MSWC.NextLink") <BR>if request.querystring("value")="10" then <BR>strfile="10.txt" &#039; use this text file <BR>Else <BR>if request.querystring("value")="20" then <BR>strfile="20.txt" &#039;use this text file <BR>end if <BR> end if <BR> and so on... <BR><BR>If MySlides.GetListIndex (strfile) &#062; 1 Then <BR>%&#062; <BR> &#060;a href="&#060;%= MySlides.GetPreviousURL (strfile)%"&#062;Previous&#060;/a&#062; &#060;% End If %&#062; <BR>&#060;a href="&#060;%=MySlides.GetNextURL (strfile) %&#062;"Next&#060;/a&#062; <BR><BR>The first page opens that corresponds to the one in the text file. But because the statement is not being met by the next link it won&#039;t use the text file and consequently won&#039;t show the link on the next page.(just an error message "MSWC.NextLink error &#039;80004005&#039; ERROR can not translate virtual root, GetListIndex") <BR>I&#039;ve tried adding ?vaule=10 on each of the file names in the text file but it doesn&#039;t want to link to the next file in the list, and just keeps reloading itself <BR>I also tried to overwrite the text file as the user selects a category but that won&#039;t work with more than 1 user at a time.<BR><BR>I could create the variable in one page and allow the code in the other pages to default to it should none of the criteria be met.but i don&#039;t know how to either.....<BR>any ideas or am i going about it all the wrong way!<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