SQL Query Help

H

Harddrive747

I have followed the instruction on Microsoft's web site to create a simple
password protected web pages. I'm able to query the database for user name
and passowrd and compare them, just like the article from Microsoft tells me
to.

Now what I want to do at the top of each page that is password protected is
to show the user name, a logout button and to have an EDIT button or link. I
haven't decided which.

When the user clicks the EDIT link, I will have it go to their record in the
Contacts table.

Now what I want to do is to query the database for the ID Number of the
user. I'm able to get the query to work. The query is

Select Contact_Id from Contacts where UID='<userid>'

I want to get the value of Contact_Id so that I can place it in the
hyperlink section for th EDIT link so that when I go to edit their record, I
can pull up the correct record.

So how do I get the actual value of Contact_Id? I can't use the WEBBOT
because I can't pass a variable into the query. If there is a way to do
that, then let me know. I have tried ::<variable Name>>:: and it won't work.

So any help of getting the actual value returned by the SQL Select statement
would be greatly apprechiated.

Thanks
Terry
 
B

Bob Lehmann

You have exceeded the DB(I,W,R, flavor of the day, take your pick) thingy's
capabilities.

The built in databse stuff is mostly crap, except for simple selects. You
will probably need to code your own.

Bob Lehmann
 
H

Harddrive747

Bob, I have coded my own and that is what the SQL statement in my message is.

What I want to know is how do I get the Contact_ID from the query and put it
into a variable to be used in other parts of the page.

So if I run the query without the web bot, I want the value of the matching
record. So for instances, if my UID is tpalmer and the contact_ID for me is
12, then I want to be able to put 12 into a variable to use in other parts of
the page. How do it get the 12 from the SQL statement? What is the command
to show me the actual value in the Contact_ID field.

Thanks for the help.
 
Top