You don't use response write to set the variable in the page
<%
If Len(Session("txtAgentUserID")) = 0 Then
Response.redirect "theLoginPage.asp"
'you want to send them to login page here to prevent errors in the DBWR
Else
txtAgentUserID = Session("txtAgentUserID")
'you are declaring the variable (using =) here for use in the DBRW
End If
%>
--
_____________________________________________
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
_____________________________________________
| Stefan,
|
| This is exactly what I need. However I still cannot get it to work.
|
| Here is the code in I added fpdbrgn1.inc:
|
| if len(fp_sValue) = 0 then fp_sValue = Request.QueryString(fp_sField)
| ' ECSS Custom Code - (The following line was added 11/7/2005 by Max Michaels)
| if len(fp_sValue) = 0 then fp_sValue = Session(fp_sField)
|
| Here is code from th page I am working with
|
| <%
| If Len(Session("txtAgentUserID")) = 0 Then
| Response.Write "<b>You are not logged on.</b>"
| Else
| Response.Write "<b>" & Session("txtAgentUserID") & "</b>"
| End If
| %>
|
| My assumption is that the variable txtAgentUserID can now be used in the DRW
| for running my query.
|
| Here is the custom query I run:
|
| SELECT DOC_Name as 'Document',
| ECSS_Date as 'ECSS Date',
| Carrier_Date as 'Carrier Date',
| Carrier_On_File as 'Filing Valid'
| FROM tblCheckList
| WHERE UID = '::txtAgentUserID::'
|
| When I run this I receive the following error message:
|
| Database Results Wizard Error
| Your page contains a query with user input parameters that could not be
| resolved.
| This could happen if your DatabaseRegionStart webbot has an empty or missing
| s-columnnames or s-columntypes attributes.
| You may need to read Microsoft Knowledge Base Article 817029.
|
| Any thoughts are appreciated.
|
|
|
|
|
|
| The following code is in the beginning of the page I am working with:
|
|
|
| --
| Max M.
|
|
| "Stefan B Rusynko" wrote:
|
| > See
http://home.att.net/~codelibrary/FrontPage/tweaks.htm#Link
| >
| > --
| >
| > _____________________________________________
| > 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
| > _____________________________________________
| >
| >
| > |I am using the Frontpage 2003 Database Results Wizard to retrieve a list of
| > | rows from a database table. I want to filter the data based on the user id
| > | logged on to the website. I have a session variable that contains the user
| > | id. I cannot find a way to incorporate this into the SQL. I can let the
| > | wizard generate a form that needs the user id (nad password). This works but
| > | it is redundant. I already have a login routine that has accomplihed this.
| > | I just want to grab the userid inser it into the "where" clause and filter
| > | the results from the database with rows for that user.
| > |
| > | --
| > | Max M.
| >
| >
| >