drdisk
Posts: 13
|
Posted: 09/03/2004, 10:57 AM |
|
I am using ASP 3.0 with templates and I follow the example for the multi-step Registration and Still can't get it to work. I am using one table called Patients with a unique ID call Patient_ID.
The Patient_ID will not carry over to the second page.
Here is my Custom Code.
<%
'BindEvents Method @1-9DF36AA0
Sub BindEvents()
Set Patients.CCSEvents("AfterInsert") = GetRef("Patients_AfterInsert")
End Sub
'End BindEvents Method
Function Patients_AfterInsert() 'Patients_AfterInsert @4-AECAD3DF
Dim LastID
'Retrieve the last inserted key if a new user is registered
'This method of retrieving the last inserted key is safe because the value of the user_login field has to be unique.
If IsEmpty(Request.QueryString("Patient_ID")) Then
LastID = CCDLookup("max(Patient_ID)","Patients","Patient_Name="&DBConnection1.ToSQL(Request.Form("Patient_Name"),"CCText"),DBConnection1)
If InStr(Redirect,"?") = 0 Then
Redirect = Redirect & "?Patient_ID=" & LastID
ElseIf Right(Redirect, 1) = "?" Then
Redirect = Redirect & "Patient_ID=" & LastID
Else
Redirect = Redirect & "&Patient_ID=" & LastID
End If
End IF
'Custom Code @25-73254650
' -------------------------
' Write your own code here.
' -------------------------
'End Custom Code
'End Custom Code
End Function 'Close Patients_AfterInsert @4-54C34B28
%>
Thanks
|
|
|
drdisk
Posts: 13
|
Posted: 09/03/2004, 11:11 AM |
|
I fixed the Problem
Thanks
|
|
|
|