Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Link Issue

Status
Not open for further replies.

anon007

Programmer
Oct 23, 2007
71
US
Here is my delima, I have a page lets say page one and on page one I have a list of accounts with an update accounts link on it going to the update_account.asp page where an sql statment runs to open the record with the right information. How can I create a session needed, or how do I code it to that the link provides the info for the update page so the right record is opened?

Any direction would be great
 
How about putting the record's unique ID on the QueryString for each link?

So that the browser receives something like this:[tt]
<a href="update_account.asp?ID=1">Account One</a>
<br>
<a href="update_account.asp?ID=2">Account Two</a>
<br?
<a href="update_account.asp?ID=3">Account Three</a>
[/tt]

 
OK I have the string in place now when it opens the asp page how do I get the statement recnize the ID.

This is on the update page to open the record.

sql = "SELECT * FROM [Accounts] WHERE [Accounts].[AccountID]=" &Trim("ID")
 
sql = "SELECT * FROM [Accounts] WHERE [Accounts].[AccountID]=" & [!]Response.QueryString[/!]("ID")


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
I almost got it but now I gewt this error

Object doesn't support this property or method: 'Response.QueryString'
 
QueryString is a property of the Request object... try:

[red]Request[/red].QueryString("ID")
 
lol perfect ok so I am still learning asp. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top