%
Dim RS
Dim rContact
Dim rEMail
Dim rPhone
Dim Conn
Call CCreateConnection
%>
<% If (oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin)) Then %>
<%
Set RS = Conn.Execute("GetCustomer(" & oPassMgrObj.Profile("MemberIdHigh") & "," & oPassMgrObj.Profile("MemberIdlow") & ")")
If (Err.Number <> 0) Then
Response.Write "
" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "
"
Response.Write "
" & L_COMMENTS_DATABASE_FAILED_TEXT & "
"
%><%
Call CDestroyObjects
Response.End
End If
If (Not RS.EOF) Then
rContact = RS("Contact")
rEMail = RS("EMail")
rPhone = RS("Phone")
if IsNull(RS("PremierID")) = false then
if RS("PremierID") <> "" then
Response.Cookies("intCustomerPremierID") = RS("PremierID")
else
Response.Cookies("intCustomerPremierID") = 0
end if
end if
RS.Close
Else
rPhone = ""
rContact = oPassMgrObj.Profile("MemberName")
rEMail = oPassMgrObj.Profile("PreferredEMail")
Response.Cookies("intCustomerPremierID") = 0
End If
Set RS = Nothing
Private Sub CCreateConnection
Set Conn = Server.CreateObject("ADODB.Connection")
With Conn
.ConnectionString = strCustomer
.CursorLocation = adUseClient
.ConnectionTimeout = strGlobalConnectionTimeout
.Open
End With
If Conn.Errors.Count > 0 Then
Response.Write "Connection Error: [" & Conn.Errors(0).Number & "]" & Conn.Errors(0).Description
Call CDestroyObjects
Response.End
End If
End Sub
Private Sub CDestroyObjects
Conn.Close
Set Conn = Nothing
End Sub
%>
<% Else %>
<% End If %>
<%
Call CDestroyObjects
%>