devxlogo

Accessing Recordset in Another ASP Page

Accessing Recordset in Another ASP Page

Question:

I am creating a site with a public area and a secure area, which is broken into three parts. To enter security, the user goes to LogIn.htm and enters their name and PW. Then they can choose to go to area 1,2,or 3.

The problem is that I can’t seem to access the recordset that was made when they logged in. I used an SQL, retrieving all info for the person who matched login and password, and so on. Now I need to access those records to see if they have “yes” or “no” in a certain field in the DB. What code do I need in order to access the recordset I made during their login?

Answer:

Since you closed the recordset, you cannot access it anymore. There are two ways to solve your problem:

a) Store the recordset in a session variable and use it over again. This method is not recommended.

b) Open the recordset again in the second page, the same way you opened it in the login page. You will need to store the UserId and Password in the session variables to reuse it again.

See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist