Dante S.
|
| Posted: 06/11/2002, 2:29 AM |
|
Hello.
I have a login form based on a table in a database. This table has user id,
password, access_level fields used in setting up security. There are other
fields in the table (e.g. firstname, lastname, location) that I want to be
available to all pages in the project. Making these extra fields available
to all pages in the project is my problem. I have no idea on how to do
this.
If anyone out there knows how, pls. help me by giving me a step by step
process in doing this. I am using ASP 3.0 + template.
Many thanks,
Dante
|
|
|
 |
Patrick
|
| Posted: 06/11/2002, 4:56 AM |
|
hmm, almost the same problem here. I'm trying to do an additional select
based on the userid after login. I can not figure out where to put the
additional custom (asp) code. Trying some things, I ran into another issue:
how can I use the database connection on the login form ? Using the DBname
object doesn't work as it's not initialised.
Patrick
"Dante S." <disandigan@loyolaplans.com> wrote in message
news:ae4fum$807$1@news.codecharge.com...
> Hello.
>
> I have a login form based on a table in a database. This table has user
id,
> password, access_level fields used in setting up security. There are
other
> fields in the table (e.g. firstname, lastname, location) that I want to be
> available to all pages in the project. Making these extra fields
available
> to all pages in the project is my problem. I have no idea on how to do
> this.
>
> If anyone out there knows how, pls. help me by giving me a step by step
> process in doing this. I am using ASP 3.0 + template.
>
> Many thanks,
> Dante
>
>
|
|
|
 |
Robert Rodgers
|
| Posted: 06/11/2002, 9:48 AM |
|
Dante,
Using ASP
What I did was open the code on the login page. I placed this code after
the event for the login button.
You can also do it in the CCLoginUser() function in the Common.asp file if
you want.
If Login_DoLogin_OnClick = True Then
Dim Connection
Set Connection = New clsDBKB
Connection.Open
Session("WQStatusPending") = CCDLookUp("WQStatusPending",
"KB_KBConfig", "KBCnfgSysID=1", Connection)
Session("CallStatus") = CCDLookUp("CallStatus", "KB_KBConfig",
"KBCnfgSysID=1", Connection)
Connection.Close
Set Connection = Nothing
End If
--
Robert Rodgers
Robert@SylvanComputing.com
Ph: 509.531.4351
Fax: 503.961.0317
Text Message: mailto:5095314351@mobile.att.net
--
"Dante S." <disandigan@loyolaplans.com> wrote in message
news:ae4fum$807$1@news.codecharge.com...
> Hello.
>
> I have a login form based on a table in a database. This table has user
id,
> password, access_level fields used in setting up security. There are
other
> fields in the table (e.g. firstname, lastname, location) that I want to be
> available to all pages in the project. Making these extra fields
available
> to all pages in the project is my problem. I have no idea on how to do
> this.
>
> If anyone out there knows how, pls. help me by giving me a step by step
> process in doing this. I am using ASP 3.0 + template.
>
> Many thanks,
> Dante
>
>
|
|
|
 |
Dante S.
|
| Posted: 06/12/2002, 10:01 PM |
|
Thanks for the help Robert.
I found a simpler solution.
In the project explorer, right-click Common Files and choose Open.
Under the Common Files tab, click on Common.asp.
Find the CCLoginUser function (you can find this towards the end, it's the
second to the last function listed).
In the SQL variable, add your extra field in the select statement.
About two lines below, you'll find and IF statement (If Result Then....),
you can add a session variable and assign the field your added on the sql
statement you added in the SQL variable:
e.g. Session("MyNewSessionVar") = RecordSet("MyAdditionalField")
Regenerate/publish the Common Files.
I use the added session field in my pages by putting
Session("MyNewSessionVar") in the default property of the object (label,
text field, etc.). Works like a charm for me :)
|
|
|
 |
|