Forums

This topic is locked

SQL is this do able

Posted 19 Mar 2004 17:45:42
1
has voted
19 Mar 2004 17:45:42 phil C posted:
SETUP
access database site with 2 tables, users & casedata

using a simple statment below how can i replace the variable 'Manchester' from a field in the users table as the page loads.

i donot want the link from the previous page to contain any search critera ie:
/results.asp?office=manchester

i only want the link to be /results.asp and the critera taken from the database as the page loads.

SELECT *
FROM casedata
WHERE office = 'Manchester'

Replies

Replied 20 Mar 2004 20:38:30
20 Mar 2004 20:38:30 Phil Shevlin replied:
The issue is not with the SQL its with the .asp.

I assume you are passing manchester from a form of the previous page?

I'd rather see your code before making a suggestion.

Edited by - wdglide on 20 Mar 2004 20:38:50
Replied 21 Mar 2004 23:57:17
21 Mar 2004 23:57:17 phil C replied:
no, the variables are held in the users table within a seperate database.

all i can think of to explain better is to show the code below, i know it wont work but its what im tring to do.

SELECT *
FROM casedata
WHERE office = '<%=(rs_cases.Fields.Item("office".Value)%>'
Replied 22 Mar 2004 00:20:32
22 Mar 2004 00:20:32 Phil Shevlin replied:
It is doable. But I cannot tell you how without seeing your code.

Your office value needs to be obtained from somewhere (like a session or another recordset). Then you use code something like you have.



Replied 22 Mar 2004 00:45:39
22 Mar 2004 00:45:39 phil C replied:
Hi wdglide
seems like your my mentor tonight,

I.ve used session variable to collect info during login and it seems to work ok so i'll leave it like that for now..

Thanks alot for the help, it is appricated..

Phil

Reply to this topic