VBscript query results to a form

J

Jim T

Although I have found a number of example of logon scripts, I am writing
(and trying to learn) a VBScript that will take user id and password entries
on a form on a page name logoon.asp and used query an imported MS-Access 2000
DB. The records in a table named owner_name in the DB contains user id and
password fields as well as a unique record key of owner_id.

I have a fair background in Access VBA but a newbie at Front Page and
VBscript. I think I have the conn, open DB, and exec sql with the form user
id and password criteria coded OK. I have a do-loop to read the single record
in the recordset to get the owner_id field value.
OWNER_ID = RS.FIELDS ("OWNER_ID")

My questions is once I have the unique key (owner_id) from the Access
record, how do I "post" it back to the form?

I'm hoping to use KB Article 308697 to pass this unique key to the first of
a series of pages with queried data particular to the "owner".

Part 2
The majority of the web pages are public so the logon.asp (two levels down
one leg of the navigation structure) and used only to provide/protect access
to the user's unique data. After the submit on the logon.asp page and passing
a check of user id and password in the DB; the script should redirect the
user to the first "protected" page. (All other owner pages will be linked
from this page and the data queried using the unique owner_id value).

Is the following code the method to "jump to" the first protected page and
if so where in the script must it be placed?

response.redirect "owner_name_pg1"

Part 3
====
I've familiar with the MS-Access VBA debuging tools; is there similar
available debugging line and variable tools?

(this web development is a donation to my home town)

Thanks...
Jim Tinder
 
S

Stefan B Rusynko

See http://support.microsoft.com/default.aspx?scid=321439

Once you have the user logged in you can pass the ID to other pages using a session variable
See http://www.w3schools.com/asp/default.asp
and http://www.asp101.com/samples/

<% Session("OWNER_ID") = RS.FIELDS ("OWNER_ID") %>
Then call it using
<%=Session("OWNER_ID")%>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Although I have found a number of example of logon scripts, I am writing
| (and trying to learn) a VBScript that will take user id and password entries
| on a form on a page name logoon.asp and used query an imported MS-Access 2000
| DB. The records in a table named owner_name in the DB contains user id and
| password fields as well as a unique record key of owner_id.
|
| I have a fair background in Access VBA but a newbie at Front Page and
| VBscript. I think I have the conn, open DB, and exec sql with the form user
| id and password criteria coded OK. I have a do-loop to read the single record
| in the recordset to get the owner_id field value.
| OWNER_ID = RS.FIELDS ("OWNER_ID")
|
| My questions is once I have the unique key (owner_id) from the Access
| record, how do I "post" it back to the form?
|
| I'm hoping to use KB Article 308697 to pass this unique key to the first of
| a series of pages with queried data particular to the "owner".
|
| Part 2
| The majority of the web pages are public so the logon.asp (two levels down
| one leg of the navigation structure) and used only to provide/protect access
| to the user's unique data. After the submit on the logon.asp page and passing
| a check of user id and password in the DB; the script should redirect the
| user to the first "protected" page. (All other owner pages will be linked
| from this page and the data queried using the unique owner_id value).
|
| Is the following code the method to "jump to" the first protected page and
| if so where in the script must it be placed?
|
| response.redirect "owner_name_pg1"
|
| Part 3
| ====
| I've familiar with the MS-Access VBA debuging tools; is there similar
| available debugging line and variable tools?
|
| (this web development is a donation to my home town)
|
| Thanks...
| Jim Tinder
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top