I was given the following scenario, and would like to confirm what the
correct answer will be.

Say you have 3 ASP pages, on each page the user needs to complete
information.
Page 1: first name and last name.
When user click the "next" button, go to Page 2. The ASP page calls a VB DLL
(say Process.DLL) to enter the information for first name and last name.
Page 2: address
When user click the "next" button, go to Page 3. The ASP page calls a VB DLL
(say Process.DLL) to enter the information for address.
Page 3: age
When user click the "save" button, you need to save the information entered
on page 1, 2 and 3 into a database.

The question is: by the time you are on the 3rd page, will the data from
Page 1 and 2 still in the Process.DLL ?

In my opinion, instead of calling the DLL on Page 1 and 2, use Session
variables to store the first name, last name and address from Page 1 and 2.
When you get to Page 3, pass the Session variable to the Process.DLL.
Usually when I call a DLL (Set oProcess =
server.CreateObject("ProcessObject.clsA"), before I exit this ASP page, I
will set the oProcess variable to nothing (set oProcess = nothing). I read
that passing an object like oProcess in a Session variable is not a good
idea.
So, when I get to Page 2, oProcess will be a new instance again, thus the
information from Page 1 won't be there anymore.

Would you please give me your opinion on this. Is the method to call the DLL
on each page a better idea, and will you get all info from Page 1 and 2 by
the time you are on Page 3, or using the Session Variable to store the first
name, last name and address from Page 1 and 2 is a better idea ?

Thank you.

Re: Question about DLL in ASP by Roji

Roji
Sat Aug 14 03:58:58 CDT 2004

You have to perisist the data somewhere.
DLLS cant keep them in memory and Session variables
are not the right choice.

Save them to the database while the user saves every page.
Use a flag to denote whether the entry is completed, or use an auxilary
table which can be cleared periodically.

--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com


"Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
news:OxZO%23lXgEHA.3016@tk2msftngp13.phx.gbl...
> I was given the following scenario, and would like to confirm what the
> correct answer will be.
>
> Say you have 3 ASP pages, on each page the user needs to complete
> information.
> Page 1: first name and last name.
> When user click the "next" button, go to Page 2. The ASP page calls a VB
DLL
> (say Process.DLL) to enter the information for first name and last name.
> Page 2: address
> When user click the "next" button, go to Page 3. The ASP page calls a VB
DLL
> (say Process.DLL) to enter the information for address.
> Page 3: age
> When user click the "save" button, you need to save the information
entered
> on page 1, 2 and 3 into a database.
>
> The question is: by the time you are on the 3rd page, will the data from
> Page 1 and 2 still in the Process.DLL ?
>
> In my opinion, instead of calling the DLL on Page 1 and 2, use Session
> variables to store the first name, last name and address from Page 1 and
2.
> When you get to Page 3, pass the Session variable to the Process.DLL.
> Usually when I call a DLL (Set oProcess =
> server.CreateObject("ProcessObject.clsA"), before I exit this ASP page, I
> will set the oProcess variable to nothing (set oProcess = nothing). I read
> that passing an object like oProcess in a Session variable is not a good
> idea.
> So, when I get to Page 2, oProcess will be a new instance again, thus the
> information from Page 1 won't be there anymore.
>
> Would you please give me your opinion on this. Is the method to call the
DLL
> on each page a better idea, and will you get all info from Page 1 and 2 by
> the time you are on Page 3, or using the Session Variable to store the
first
> name, last name and address from Page 1 and 2 is a better idea ?
>
> Thank you.
>
>



Re: Question about DLL in ASP by John

John
Sat Aug 14 05:30:46 CDT 2004

You can also transfert the variables from the 1° to the 2° page and store
them in HIDDEN FIELDS

Response.Write "<INPUT TYPE=""HIDDEN"" VALUE=" & Chr(34) &
Request.QueryString("FirstName") & Chr(34) & " NAME=""Firstname"">