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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expected end of statement

Status
Not open for further replies.

ShawnDT

Technical User
May 1, 2006
67
US
Good Morning,

I am try to use the response.redirect to after posting data to a database. Redirect page and parameter to a different page. I am having No success. Can some take a look-see at my code?
I am not sure if I am using the proper syntax to achieve this. Please let me know or tell me how to better to perform this method.
I will mark line 145 in the code. I will post code below.

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/DB/producerdetailupdate.asp, line 145, column 80


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/connDB.asp" -->
<%

Dim cmdUpdate__ProducerID
cmdUpdate__ProducerID = ""
if(Request("ProducerID") <> "") then cmdUpdate__ProducerID = Request("ProducerID")

Dim cmdUpdate__LastName
cmdUpdate__LastName = ""
if(Request("LastName") <> "") then cmdUpdate__LastName = Request("LastName")

Dim cmdUpdate__FirstName
cmdUpdate__FirstName = ""
if(Request("FirstName") <> "") then cmdUpdate__FirstName = Request("FirstName")

Dim cmdUpdate__PreferredName
cmdUpdate__PreferredName = ""
if(Request("PreferredName") <> "") then cmdUpdate__PreferredName = Request("PreferredName")

Dim cmdUpdate__FirmName
cmdUpdate__FirmName = ""
if(Request("FirmName") <> "") then cmdUpdate__FirmName = Request("FirmName")

Dim cmdUpdate__BrokerDealer
cmdUpdate__BrokerDealer = ""
if(Request("BrokerDealer") <> "") then cmdUpdate__BrokerDealer = Request("BrokerDealer")

Dim cmdUpdate__Address1
cmdUpdate__Address1 = ""
if(Request("Address1") <> "") then cmdUpdate__Address1 = Request("Address1")

Dim cmdUpdate__Address2
cmdUpdate__Address2 = ""
if(Request("Address2") <> "") then cmdUpdate__Address2 = Request("Address2")

Dim cmdUpdate__City
cmdUpdate__City = ""
if(Request("City") <> "") then cmdUpdate__City = Request("City")

Dim cmdUpdate__State
cmdUpdate__State = ""
if(Request("State") <> "") then cmdUpdate__State = Request("State")

Dim cmdUpdate__ZIP
cmdUpdate__ZIP = "43223"
if(Request("ZIP") <> "") then cmdUpdate__ZIP = Request("ZIP")

Dim cmdUpdate__Phone
cmdUpdate__Phone = "0"
if(Request("Phone") <> "") then cmdUpdate__Phone = Request("Phone")

Dim cmdUpdate__Ext
cmdUpdate__Ext = ""
if(Request("Ext") <> "") then cmdUpdate__Ext = Request("Ext")

Dim cmdUpdate__Cell
cmdUpdate__Cell = "0"
if(Request("Cell") <> "") then cmdUpdate__Cell = Request("Cell")

Dim cmdUpdate__Fax
cmdUpdate__Fax = "0"
if(Request("Fax") <> "") then cmdUpdate__Fax = Request("Fax")

Dim cmdUpdate__Email
cmdUpdate__Email = ""
if(Request("Email") <> "") then cmdUpdate__Email = Request("Email")

Dim cmdUpdate__RPC
cmdUpdate__RPC = ""
if(Request("RPC") <> "") then cmdUpdate__RPC = Request("RPC")

Dim cmdUpdate__InternalWholesaler
cmdUpdate__InternalWholesaler = ""
if(Request("InternalWholesaler") <> "") then cmdUpdate__InternalWholesaler = Request("InternalWholesaler")

Dim cmdUpdate__StateLicensed
cmdUpdate__StateLicensed = ""
if(Request("StateLicensed") <> "") then cmdUpdate__StateLicensed = Request("StateLicensed")

Dim cmdUpdate__SecuritiesLicense
cmdUpdate__SecuritiesLicense = ""
if(Request("SecuritiesLicense") <> "") then cmdUpdate__SecuritiesLicense = Request("SecuritiesLicense")

Dim cmdUpdate__TrustLicense
cmdUpdate__TrustLicense = ""
if(Request("TrustLicense") <> "") then cmdUpdate__TrustLicense = Request("TrustLicense")

%>
<%
Dim rstProducerDetail__ProducerID
rstProducerDetail__ProducerID = "0"
If (Request.querystring("ProducerID") <> "") Then
rstProducerDetail__ProducerID = Request.querystring("ProducerID")
End If
%>
<%
Dim rstProducerDetail
Dim rstProducerDetail_numRows

Set rstProducerDetail = Server.CreateObject("ADODB.Recordset")
rstProducerDetail.ActiveConnection = MM_connDB_STRING
rstProducerDetail.Source = "{call dbo.spProducerDetailSelect(" + Replace(rstProducerDetail__ProducerID, "'", "''") + ")}"
rstProducerDetail.CursorType = 0
rstProducerDetail.CursorLocation = 2
rstProducerDetail.LockType = 1
rstProducerDetail.Open()

rstProducerDetail_numRows = 0
%>
<%
If Request("butsave") <> "" Then

set cmdUpdate = Server.CreateObject("ADODB.Command")
cmdUpdate.ActiveConnection = MM_connDB_STRING
cmdUpdate.CommandText = "dbo.spProducerUpdate"
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@RETURN_VALUE", 3, 4)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@ProducerID", 3, 1,4,cmdUpdate__ProducerID)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@LastName", 200, 1,50,cmdUpdate__LastName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@FirstName", 200, 1,30,cmdUpdate__FirstName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@PreferredName", 200, 1,30,cmdUpdate__PreferredName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@FirmName", 200, 1,100,cmdUpdate__FirmName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@BrokerDealer", 200, 1,100,cmdUpdate__BrokerDealer)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Address1", 200, 1,60,cmdUpdate__Address1)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Address2", 200, 1,60,cmdUpdate__Address2)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@City", 200, 1,30,cmdUpdate__City)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@State", 200, 1,2,cmdUpdate__State)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@ZIP", 200, 1,10,cmdUpdate__ZIP)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Phone", 20, 1,14,cmdUpdate__Phone)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Ext", 200, 1,5,cmdUpdate__Ext)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Cell", 20, 1,14,cmdUpdate__Cell)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Fax", 20, 1,14,cmdUpdate__Fax)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Email", 200, 1,50,cmdUpdate__Email)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@RPC", 200, 1,50,cmdUpdate__RPC)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@InternalWholesaler", 200, 1,50,cmdUpdate__InternalWholesaler)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@StateLicensed", 200, 1,2,cmdUpdate__StateLicensed)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@SecuritiesLicense", 200, 1,3,cmdUpdate__SecuritiesLicense)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@TrustLicense", 200, 1,3,cmdUpdate__TrustLicense)
cmdUpdate.CommandType = 4
cmdUpdate.CommandTimeout = 0
cmdUpdate.Prepared = true
cmdUpdate.Execute()
end if
%>
Line 145 <% Response.redirect"producerdetail.asp?ProducerID=(rstProducerDetail.Fields.Item("ProducerID").Value) %>" %>
<%
Dim rstStates
Dim rstStates_numRows

Set rstStates = Server.CreateObject("ADODB.Recordset")
rstStates.ActiveConnection = MM_connDB_STRING
rstStates.Source = "{call dbo.spStateSelect}"
rstStates.CursorType = 0
rstStates.CursorLocation = 2
rstStates.LockType = 1
rstStates.Open()

rstStates_numRows = 0
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (RstPlanContact_total = -1) Then

' count the total records by iterating through the recordset
RstPlanContact_total=0
While (Not RstPlanContact.EOF)
RstPlanContact_total = RstPlanContact_total + 1
RstPlanContact.MoveNext
Wend

' reset the cursor to the beginning
If (RstPlanContact.CursorType > 0) Then
RstPlanContact.MoveFirst
Else
RstPlanContact.Requery
End If

' set the number of rows displayed on this page
If (RstPlanContact_numRows < 0 Or RstPlanContact_numRows > RstPlanContact_total) Then
RstPlanContact_numRows = RstPlanContact_total
End If

' set the first and last displayed record
RstPlanContact_first = 1
RstPlanContact_last = RstPlanContact_first + RstPlanContact_numRows - 1

If (RstPlanContact_first > RstPlanContact_total) Then
RstPlanContact_first = RstPlanContact_total
End If
If (RstPlanContact_last > RstPlanContact_total) Then
RstPlanContact_last = RstPlanContact_total
End If

End If
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#layMainMenu {
position:absolute;
left:0px;
top:0px;
width:150px;
height:41px;
z-index:0;
visibility: visible;
}
.style5 {
font-size: xx-large;
font-weight: bold;
}
-->
</style>
</head>

<body>
<div id="layMainMenu"><!-- #BeginLibraryItem "/Library/mainmenu.lbi" --><table width="140" border="1">
<tr>
<td width="234"><div align="center"><a href="default.asp?screen=main">DB Main </a></div></td>
</tr>
<tr>
<td><div align="center"><a href="default.asp?screen=producers">Producers</a></div></td>
</tr>
<tr>
<td><div align="center"><a href="default.asp?screen=sales">Sales</a></div></td>
</tr>
<tr>
<td><div align="center">Plan Design</div></td>
</tr>
<tr>
<td><div align="center">Plan Years </div></td>
</tr>
<tr>
<td><div align="center">Billing</div></td>
</tr>
<tr>
<td><div align="center">Money Processing </div></td>
</tr>
<tr>
<td><div align="center">Reports</div></td>
</tr>
<tr>
<td><div align="center"><a href="#" onclick="window.close()">Exit/Logoff System </div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td></td>
</tr>
</table><!-- #EndLibraryItem --></div>
<form name="form1" id="form1" method="post" action="">
<div id="layProducerDetail" style="position:absolute; left:200px; top:0px; width:600px; height:200px; z-index:0; visibility: visible;"><span class="style5">Edit Producer Detail&nbsp;&nbsp;&nbsp;</span>

<input name="butSave" type="submit" value="Save" />&nbsp;&nbsp;&nbsp;<input name="butCancel" type="button" value="Cancel" />

<table width="638" border="1" cellspacing="2" cellpadding="2">
<tr>
<td width="100">Name (F/L) </td>
<td width="258"><input name="txtFirstName" type="text" id="txtFirstName" value="<%=(rstProducerDetail.Fields.Item("FirstName").Value)%>" />&nbsp;<input name="txtLastName" type="text" id="txtLastName" value="<%=(rstProducerDetail.Fields.Item("LastName").Value)%>" /></td>
<td width="97">State Licensed </td>
<td width="109"><select name="select">
<%
While (NOT rstStates.EOF)
%>
<option value="<%=(rstStates.Fields.Item("Abbr").Value)%>" <%If (Not isNull((rstProducerDetail.Fields.Item("StateLicensed").Value))) Then If (CStr(rstStates.Fields.Item("Abbr").Value) = CStr((rstProducerDetail.Fields.Item("StateLicensed").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rstStates.Fields.Item("State").Value)%></option>
<%
rstStates.MoveNext()
Wend
If (rstStates.CursorType > 0) Then
rstStates.MoveFirst
Else
rstStates.Requery
End If
%>
</select></td>
</tr>
<tr>
<td>Preferred Name </td>
<td><input name="txtPreferredName" type="text" id="txtPreferredName" value="<%=(rstProducerDetail.Fields.Item("PreferredName").Value)%>" /></td>
<td>Securities Lic? </td>
<td><input name="txtSecuritiesLicense" type="text" id="txtSecuritiesLicense" value="<%=(rstProducerDetail.Fields.Item("SecuritiesLicense").Value)%>" size="10" /></td>
</tr>
<tr>
<td>Firm Name </td>
<td><input name="txtFirmName" type="text" id="txtFirmName" value="<%=(rstProducerDetail.Fields.Item("FirmName").Value)%>" /></td>
<td>Trust License? </td>
<td><input name="txtTrustLicense" type="text" id="txtTrustLicense" value="<%=(rstProducerDetail.Fields.Item("TrustLicense").Value)%>" size="10" /></td>
</tr>
<tr>
<td>Broker/Dealer</td>
<td><input name="txtBrokerDealer" type="text" id="txtBrokerDealer" value="<%=(rstProducerDetail.Fields.Item("BrokerDealer").Value)%>" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</div>

<div id="layProducerData" style="position:absolute; left:200px; top:200px; width:600px; height:300px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; visibility: visible;">
<table width="600" border="1" cellspacing="2" cellpadding="2">
<tr>
<td width="75">&nbsp;</td>
<td width="194"><div align="center">Physical Address </div></td>
<td width="18">&nbsp;</td>
<td width="75">&nbsp;</td>
<td width="194"><div align="center">Mailing Address</div></td>
</tr>
<tr>
<td>Address 1 </td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Address1").Value)%>" /></td>
<td>&nbsp;</td>
<td>Address 1 </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Address 2 </td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Address2").Value)%>" /></td>
<td>&nbsp;</td>
<td>Address 2 </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>City</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("City").Value)%>" /></td>
<td>&nbsp;</td>
<td>City</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>State</td>
<td><select name="select">
<%
While (NOT rstStates.EOF)
%>
<option value="<%=(rstStates.Fields.Item("Abbr").Value)%>" <%If (Not isNull((rstProducerDetail.Fields.Item("State").Value))) Then If (CStr(rstStates.Fields.Item("Abbr").Value) = CStr((rstProducerDetail.Fields.Item("State").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rstStates.Fields.Item("State").Value)%></option>
<%
rstStates.MoveNext()
Wend
If (rstStates.CursorType > 0) Then
rstStates.MoveFirst
Else
rstStates.Requery
End If
%>
</select></td>
<td>&nbsp;</td>
<td>State</td>
<td><select name="select">
<%
While (NOT rstStates.EOF)
%>
<option value="<%=(rstStates.Fields.Item("Abbr").Value)%>" <%If (Not isNull((rstProducerDetail.Fields.Item("State").Value))) Then If (CStr(rstStates.Fields.Item("Abbr").Value) = CStr((rstProducerDetail.Fields.Item("State").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rstStates.Fields.Item("State").Value)%></option>
<%
rstStates.MoveNext()
Wend
If (rstStates.CursorType > 0) Then
rstStates.MoveFirst
Else
rstStates.Requery
End If
%>
</select></td>
</tr>
<tr>
<td>ZIP</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("ZIP").Value)%>" /></td>
<td>&nbsp;</td>
<td>ZIP</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Phone/Ext</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Phone").Value)%>" />
&nbsp;/&nbsp; <input type="text" value="<%=(rstProducerDetail.Fields.Item("Ext").Value)%>" size="10" /></td>
<td>&nbsp;</td>
<td>Toll Free </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Cell Phone </td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Cell").Value)%>" /></td>
<td>&nbsp;</td>
<td>Fax</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Fax").Value)%>" /></td>
</tr>
<tr>
<td>E-mail</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Email").Value)%>" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>RPC</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("RPC").Value)%>" /></td>
<td>&nbsp;</td>
<td>Internal</td>
<td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("InternalWholesaler").Value)%>" /></td>
</tr>
<tr>
<td>Phone</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Phone</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
</form>                                                                                                                                
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

</body>
</html>
<%
rstProducerDetail.Close()
Set rstProducerDetail = Nothing
%>
<%
rstStates.Close()
Set rstStates = Nothing
%>
 
How?
I chucked a load of end if's, was that it?
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/connDB.asp" -->
<%

Dim cmdUpdate__ProducerID
cmdUpdate__ProducerID = ""
if(Request("ProducerID") <> "") then cmdUpdate__ProducerID = Request("ProducerID")
end if
Dim cmdUpdate__LastName
cmdUpdate__LastName = ""
if(Request("LastName") <> "") then cmdUpdate__LastName = Request("LastName")
end if
Dim cmdUpdate__FirstName
cmdUpdate__FirstName = ""
if(Request("FirstName") <> "") then cmdUpdate__FirstName = Request("FirstName")
end if
Dim cmdUpdate__PreferredName
cmdUpdate__PreferredName = ""
if(Request("PreferredName") <> "") then cmdUpdate__PreferredName = Request("PreferredName")
end if
Dim cmdUpdate__FirmName
cmdUpdate__FirmName = ""
if(Request("FirmName") <> "") then cmdUpdate__FirmName = Request("FirmName")
end if
Dim cmdUpdate__BrokerDealer
cmdUpdate__BrokerDealer = ""
if(Request("BrokerDealer") <> "") then cmdUpdate__BrokerDealer = Request("BrokerDealer")
end if
Dim cmdUpdate__Address1
cmdUpdate__Address1 = ""
if(Request("Address1") <> "") then cmdUpdate__Address1 = Request("Address1")
end if
Dim cmdUpdate__Address2
cmdUpdate__Address2 = ""
if(Request("Address2") <> "") then cmdUpdate__Address2 = Request("Address2")
end if
Dim cmdUpdate__City
cmdUpdate__City = ""
if(Request("City") <> "") then cmdUpdate__City = Request("City")
end if
Dim cmdUpdate__State
cmdUpdate__State = ""
if(Request("State") <> "") then cmdUpdate__State = Request("State")
end if
Dim cmdUpdate__ZIP
cmdUpdate__ZIP = "43223"
if(Request("ZIP") <> "") then cmdUpdate__ZIP = Request("ZIP")
end if
Dim cmdUpdate__Phone
cmdUpdate__Phone = "0"
if(Request("Phone") <> "") then cmdUpdate__Phone = Request("Phone")
end if
Dim cmdUpdate__Ext
cmdUpdate__Ext = ""
if(Request("Ext") <> "") then cmdUpdate__Ext = Request("Ext")
end if
Dim cmdUpdate__Cell
cmdUpdate__Cell = "0"
if(Request("Cell") <> "") then cmdUpdate__Cell = Request("Cell")
end if
Dim cmdUpdate__Fax
cmdUpdate__Fax = "0"
if(Request("Fax") <> "") then cmdUpdate__Fax = Request("Fax")
end if
Dim cmdUpdate__Email
cmdUpdate__Email = ""
if(Request("Email") <> "") then cmdUpdate__Email = Request("Email")
end if
Dim cmdUpdate__RPC
cmdUpdate__RPC = ""
if(Request("RPC") <> "") then cmdUpdate__RPC = Request("RPC")
end if
Dim cmdUpdate__InternalWholesaler
cmdUpdate__InternalWholesaler = ""
if(Request("InternalWholesaler") <> "") then cmdUpdate__InternalWholesaler = Request("InternalWholesaler")
end if
Dim cmdUpdate__StateLicensed
cmdUpdate__StateLicensed = ""
if(Request("StateLicensed") <> "") then cmdUpdate__StateLicensed = Request("StateLicensed")
end if
Dim cmdUpdate__SecuritiesLicense
cmdUpdate__SecuritiesLicense = ""
if(Request("SecuritiesLicense") <> "") then cmdUpdate__SecuritiesLicense = Request("SecuritiesLicense")
end if
Dim cmdUpdate__TrustLicense
cmdUpdate__TrustLicense = ""
if(Request("TrustLicense") <> "") then cmdUpdate__TrustLicense = Request("TrustLicense")
end if
%>
<%
Dim rstProducerDetail__ProducerID
rstProducerDetail__ProducerID = "0"
If (Request.querystring("ProducerID")    <> "") Then 
  rstProducerDetail__ProducerID = Request.querystring("ProducerID")   
End If
%>
<%
Dim rstProducerDetail
Dim rstProducerDetail_numRows

Set rstProducerDetail = Server.CreateObject("ADODB.Recordset")
rstProducerDetail.ActiveConnection = MM_connDB_STRING
rstProducerDetail.Source = "{call dbo.spProducerDetailSelect(" + Replace(rstProducerDetail__ProducerID, "'", "''") + ")}"
rstProducerDetail.CursorType = 0
rstProducerDetail.CursorLocation = 2
rstProducerDetail.LockType = 1
rstProducerDetail.Open()

rstProducerDetail_numRows = 0
%>
<%
If Request("butsave") <> "" Then 

set cmdUpdate = Server.CreateObject("ADODB.Command")
cmdUpdate.ActiveConnection = MM_connDB_STRING
cmdUpdate.CommandText = "dbo.spProducerUpdate"
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@RETURN_VALUE", 3, 4)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@ProducerID", 3, 1,4,cmdUpdate__ProducerID)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@LastName", 200, 1,50,cmdUpdate__LastName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@FirstName", 200, 1,30,cmdUpdate__FirstName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@PreferredName", 200, 1,30,cmdUpdate__PreferredName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@FirmName", 200, 1,100,cmdUpdate__FirmName)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@BrokerDealer", 200, 1,100,cmdUpdate__BrokerDealer)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Address1", 200, 1,60,cmdUpdate__Address1)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Address2", 200, 1,60,cmdUpdate__Address2)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@City", 200, 1,30,cmdUpdate__City)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@State", 200, 1,2,cmdUpdate__State)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@ZIP", 200, 1,10,cmdUpdate__ZIP)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Phone", 20, 1,14,cmdUpdate__Phone)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Ext", 200, 1,5,cmdUpdate__Ext)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Cell", 20, 1,14,cmdUpdate__Cell)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Fax", 20, 1,14,cmdUpdate__Fax)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@Email", 200, 1,50,cmdUpdate__Email)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@RPC", 200, 1,50,cmdUpdate__RPC)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@InternalWholesaler", 200, 1,50,cmdUpdate__InternalWholesaler)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@StateLicensed", 200, 1,2,cmdUpdate__StateLicensed)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@SecuritiesLicense", 200, 1,3,cmdUpdate__SecuritiesLicense)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@TrustLicense", 200, 1,3,cmdUpdate__TrustLicense)
cmdUpdate.CommandType = 4
cmdUpdate.CommandTimeout = 0
cmdUpdate.Prepared = true
cmdUpdate.Execute()
end if
%>
<% Response.redirect"producerdetail.asp?ProducerID=(rstProducerDetail.Fields.Item("ProducerID").Value) %>" %>
<%
Dim rstStates
Dim rstStates_numRows

Set rstStates = Server.CreateObject("ADODB.Recordset")
rstStates.ActiveConnection = MM_connDB_STRING
rstStates.Source = "{call dbo.spStateSelect}"
rstStates.CursorType = 0
rstStates.CursorLocation = 2
rstStates.LockType = 1
rstStates.Open()

rstStates_numRows = 0
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (RstPlanContact_total = -1) Then

  ' count the total records by iterating through the recordset
  RstPlanContact_total=0
  While (Not RstPlanContact.EOF)
    RstPlanContact_total = RstPlanContact_total + 1
    RstPlanContact.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (RstPlanContact.CursorType > 0) Then
    RstPlanContact.MoveFirst
  Else
    RstPlanContact.Requery
  End If

  ' set the number of rows displayed on this page
  If (RstPlanContact_numRows < 0 Or RstPlanContact_numRows > RstPlanContact_total) Then
    RstPlanContact_numRows = RstPlanContact_total
  End If

  ' set the first and last displayed record
  RstPlanContact_first = 1
  RstPlanContact_last = RstPlanContact_first + RstPlanContact_numRows - 1
  
  If (RstPlanContact_first > RstPlanContact_total) Then
    RstPlanContact_first = RstPlanContact_total
  End If
  If (RstPlanContact_last > RstPlanContact_total) Then
    RstPlanContact_last = RstPlanContact_total
  End If

End If
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#layMainMenu {
    position:absolute;
    left:0px;
    top:0px;
    width:150px;
    height:41px;
    z-index:0;
    visibility: visible;
}
.style5 {
    font-size: xx-large;
    font-weight: bold;
}
-->
</style>
</head>

<body>
<div id="layMainMenu"><!-- #BeginLibraryItem "/Library/mainmenu.lbi" --><table width="140" border="1">
    <tr>
      <td width="234"><div align="center"><a href="default.asp?screen=main">DB Main </a></div></td>
    </tr>
    <tr>
      <td><div align="center"><a href="default.asp?screen=producers">Producers</a></div></td>
    </tr>
    <tr>
      <td><div align="center"><a href="default.asp?screen=sales">Sales</a></div></td>
    </tr>
    <tr>
      <td><div align="center">Plan Design</div></td>
    </tr>
    <tr>
      <td><div align="center">Plan Years </div></td>
    </tr>
    <tr>
      <td><div align="center">Billing</div></td>
    </tr>
    <tr>
      <td><div align="center">Money Processing </div></td>
    </tr>
    <tr>
      <td><div align="center">Reports</div></td>
    </tr>
    <tr>
      <td><div align="center"><a href="#" onclick="window.close()">Exit/Logoff System </div></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td></td>
    </tr>
  </table><!-- #EndLibraryItem --></div>
<form name="form1" id="form1" method="post" action="">
<div id="layProducerDetail" style="position:absolute; left:200px; top:0px; width:600px; height:200px; z-index:0; visibility: visible;"><span class="style5">Edit Producer Detail&nbsp;&nbsp;&nbsp;</span>
  
    <input name="butSave" type="submit" value="Save" />&nbsp;&nbsp;&nbsp;<input name="butCancel" type="button" value="Cancel" />
  
  <table width="638" border="1" cellspacing="2" cellpadding="2">
    <tr>
      <td width="100">Name (F/L) </td>
      <td width="258"><input name="txtFirstName" type="text" id="txtFirstName" value="<%=(rstProducerDetail.Fields.Item("FirstName").Value)%>" />&nbsp;<input name="txtLastName" type="text" id="txtLastName" value="<%=(rstProducerDetail.Fields.Item("LastName").Value)%>" /></td>
      <td width="97">State Licensed </td>
      <td width="109"><select name="select">
        <%
While (NOT rstStates.EOF)
%>
        <option value="<%=(rstStates.Fields.Item("Abbr").Value)%>" <%If (Not isNull((rstProducerDetail.Fields.Item("StateLicensed").Value))) Then If (CStr(rstStates.Fields.Item("Abbr").Value) = CStr((rstProducerDetail.Fields.Item("StateLicensed").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rstStates.Fields.Item("State").Value)%></option>
<%
  rstStates.MoveNext()
Wend
If (rstStates.CursorType > 0) Then
  rstStates.MoveFirst
Else
  rstStates.Requery
End If
%>
      </select></td>
    </tr>
    <tr>
      <td>Preferred Name </td>
      <td><input name="txtPreferredName" type="text" id="txtPreferredName" value="<%=(rstProducerDetail.Fields.Item("PreferredName").Value)%>" /></td>
      <td>Securities Lic? </td>
      <td><input name="txtSecuritiesLicense" type="text" id="txtSecuritiesLicense" value="<%=(rstProducerDetail.Fields.Item("SecuritiesLicense").Value)%>" size="10" /></td>
    </tr>
    <tr>
      <td>Firm Name </td>
      <td><input name="txtFirmName" type="text" id="txtFirmName" value="<%=(rstProducerDetail.Fields.Item("FirmName").Value)%>" /></td>
      <td>Trust License? </td>
      <td><input name="txtTrustLicense" type="text" id="txtTrustLicense" value="<%=(rstProducerDetail.Fields.Item("TrustLicense").Value)%>" size="10" /></td>
    </tr>
    <tr>
      <td>Broker/Dealer</td>
      <td><input name="txtBrokerDealer" type="text" id="txtBrokerDealer" value="<%=(rstProducerDetail.Fields.Item("BrokerDealer").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>

</div>

<div id="layProducerData" style="position:absolute; left:200px; top:200px; width:600px; height:300px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; visibility: visible;">
  <table width="600" border="1" cellspacing="2" cellpadding="2">
    <tr>
      <td width="75">&nbsp;</td>
      <td width="194"><div align="center">Physical Address </div></td>
      <td width="18">&nbsp;</td>
      <td width="75">&nbsp;</td>
      <td width="194"><div align="center">Mailing Address</div></td>
    </tr>
    <tr>
      <td>Address 1 </td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Address1").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>Address 1 </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Address 2 </td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Address2").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>Address 2 </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>City</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("City").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>City</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>State</td>
      <td><select name="select">
        <%
While (NOT rstStates.EOF)
%>
        <option value="<%=(rstStates.Fields.Item("Abbr").Value)%>" <%If (Not isNull((rstProducerDetail.Fields.Item("State").Value))) Then If (CStr(rstStates.Fields.Item("Abbr").Value) = CStr((rstProducerDetail.Fields.Item("State").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rstStates.Fields.Item("State").Value)%></option>
<%
  rstStates.MoveNext()
Wend
If (rstStates.CursorType > 0) Then
  rstStates.MoveFirst
Else
  rstStates.Requery
End If
%>
      </select></td>
      <td>&nbsp;</td>
      <td>State</td>
      <td><select name="select">
        <%
While (NOT rstStates.EOF)
%>
        <option value="<%=(rstStates.Fields.Item("Abbr").Value)%>" <%If (Not isNull((rstProducerDetail.Fields.Item("State").Value))) Then If (CStr(rstStates.Fields.Item("Abbr").Value) = CStr((rstProducerDetail.Fields.Item("State").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rstStates.Fields.Item("State").Value)%></option>
<%
  rstStates.MoveNext()
Wend
If (rstStates.CursorType > 0) Then
  rstStates.MoveFirst
Else
  rstStates.Requery
End If
%>
      </select></td>
    </tr>
    <tr>
      <td>ZIP</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("ZIP").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>ZIP</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Phone/Ext</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Phone").Value)%>" />
      &nbsp;/&nbsp;      <input type="text" value="<%=(rstProducerDetail.Fields.Item("Ext").Value)%>" size="10" /></td>
      <td>&nbsp;</td>
      <td>Toll Free </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Cell Phone </td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Cell").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>Fax</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Fax").Value)%>" /></td>
    </tr>
    <tr>
      <td>E-mail</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("Email").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>RPC</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("RPC").Value)%>" /></td>
      <td>&nbsp;</td>
      <td>Internal</td>
      <td><input name="" type="text" id="" value="<%=(rstProducerDetail.Fields.Item("InternalWholesaler").Value)%>" /></td>
    </tr>
    <tr>
      <td>Phone</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>Phone</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  </div>
</form>                                                                                                                                
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

</body>
</html>
<%
rstProducerDetail.Close()
Set rstProducerDetail = Nothing
%>
<%
rstStates.Close()
Set rstStates = Nothing
%>

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top