This topic is locked

Redirect Code option

7/11/2006 3:22:05 PM
ASPRunnerPro General questions
Lowkeck authorDevClub member

I have two MS SQL tables with a master file relationship joined using 'filekey' as the master key.

employees (Master)

Supedits
I want to make it so that when someone clicks on the supedits from the employee view it goes direct to the add page instead of the list page. Here is an example of the URL for the add page:
/SUPEDITS_add.asp?editid=&editid2=&editid3=&TargetPageNumber=1&todo=add&masterkey=1
When I use the following redirect code it puts a null value in the filekey colum of the db. The filekey does not get transfered from the master record.
Sub ListOnLoad(strSQL)

'** Redirect to another page ****

Response.Redirect "SUPEDITS_add.asp"
End Sub
Any Ideas?

J
Jane 7/12/2006

Hi,
try to use following code:

Sub ListOnLoad(strSQL)

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open strSQL, dbConnection
Response.Redirect "SUPEDITS_add.asp?masterkey="&rsTemp("filekey")
End Sub