Andrew
asked on
Cannot convert a char value to money. The char value has incorrect syntax??
Having a problem with a reporting tool. The thing has worked for months until a negative daily sales(DSTotSales) amount got thrown into the mix today. I cant seem to pinpoint the conversion that is causing the problem....
ERROR:
Cannot convert a char value to money. The char value has incorrect syntax??
CODE:
NightlyStoreNumbers2.asp
<%
Dim RepDate,StoreName,Goal,EFT ,DSTotSale s,DSSessio ns,DDTotSa les,DDDraf tDep,DDSal esTax,DDPa ymentAcct, DDInHouse, DDGiftCert s,DDReturn EFT,DDProd Sales,DDBo nusBucks
Dim DDPrepaidDlrs,DDMysticMem, DDBuyMem,D DMysticSal es,DDMysti cSess,DDNe wClients,D DTotSess,S BCFreeze,S BCCanRegul ar,SBCCanF reeze,SBCC anMystTran ,SBCCanEft
Dim SBCCanTransfer,DaysMonth,D aysRemain
Dim PPA,TotWEft,TotWOEft,Store PPA,StoreL PPA,PerDay HitGoal,Go alPace,Num OfMem,Clos ePercent,I ncrDraft
Dim calPPA,calTotWEft,calTotWO Eft,calSto rePPA,calS toreLPPA,c alPerDayHi tGoal,calG oalPace,ca lNumOfMem, calClosePe rcent
Dim DayofMonth, calcEFT2
RepDate = Request.Form("RepDate")
StoreName = Request.Form("StoreName")
Goal = Request.Form("Goal")
Goal = Ccur(Goal)
EFT = Request.Form("EFT")
EFT = Ccur(EFT)
DSTotSales = Request.Form("DSTotSales")
DSTotSales = Ccur(DSTotSales)
DSSessions = Request.Form("DSSessions")
DSSessions = CInt(DSSessions)
DDTotSales = Request.Form("DDTotSales")
DDTotSales = Ccur(DDTotSales)
DDDraftDep = Request.Form("DDDraftDep")
DDDraftDep = Ccur(DDDraftDep)
DDSalesTax = Request.Form("DDSalesTax")
DDSalesTax = Ccur(DDSalesTax)
DDPaymentAcct = Request.Form("DDPaymentAcc t")
DDPaymentAcct = Ccur(DDPaymentAcct)
DDInHouse = Request.Form("DDInHouse")
DDInHouse = Ccur(DDInHouse)
DDGiftCerts = Request.Form("DDGiftCerts" )
DDGiftCerts = Ccur(DDGiftCerts)
DDReturnEFT = Request.Form("DDReturnEFT" )
DDReturnEFT = Ccur(DDReturnEFT)
DDProdSales = Request.Form("DDProdSales" )
DDProdSales = Ccur(DDProdSales)
DDBonusBucks = Request.Form("DDBonusBucks ")
DDBonusBucks = Ccur(DDBonusBucks)
DDPrepaidDlrs = Request.Form("DDPrepaidDlr s")
DDPrepaidDlrs = Ccur(DDPrepaidDlrs)
DDMysticMem = Request.Form("DDMysticMem" )
DDMysticMem = CInt(DDMysticMem)
DDBuyMem = Request.Form("DDBuyMem")
DDBuyMem = CInt(DDBuyMem)
DDMysticSales = Request.Form("DDMysticSale s")
DDMysticSales = Ccur(DDMysticSales)
DDMysticSess = Request.Form("DDMysticSess ")
DDMysticSess = CInt(DDMysticSess)
DDNewClients = Request.Form("DDNewClients ")
DDNewClients = CInt(DDNewClients)
DDTotSess = Request.Form("DDTotSess")
DDTotSess = CInt(DDTotSess)
SBCFreeze = Request.Form("SBCFreeze")
SBCFreeze = CInt(SBCFreeze)
SBCCanRegular = Request.Form("SBCCanRegula r")
SBCCanRegular = CInt(SBCCanRegular)
SBCCanFreeze = Request.Form("SBCCanFreeze ")
SBCCanFreeze = CInt(SBCCanFreeze)
SBCCanMystTran = Request.Form("SBCCanMystTr an")
SBCCanMystTran = CInt(SBCCanMystTran)
SBCCanEft = Request.Form("SBCCanEft")
SBCCanEft = CInt(SBCCanEft)
SBCCanTransfer = Request.Form("SBCCanTransf er")
SBCCanTransfer = CInt(SBCCanTransfer)
DaysMonth = Request.Form("DaysMonth")
DaysMonth = CInt(DaysMonth)
DaysRemain = Request.Form("DaysRemain")
DaysRemain = CInt(DaysRemain)
DayofMonth = Datepart("d",RepDate)
DayofMonth = CInt(DayofMonth)
calPPA = DSTotSales/DSSessions
PPA = CSng(calPPA)
calcTotWOEft = DDTotSales - DDDraftDep - DDInHouse - DDGiftCerts - DDReturnEFT - DDBonusBucks - DDPrepaidDlrs
TotWOEft = Ccur(calcTotWOEft)
calcTotWEft = Ccur(EFT + DDReturnEFT + TotWOEft)
TotWEft = Ccur(calcTotWEft)
calcPerDayHitGoal = (Goal - TotWEft) / DaysRemain
PerDayHitGoal = Ccur(calcPerDayHitGoal)
calcStorePPA = (TotWOEft/DDTotSess)
StorePPA = CSng(calcStorePPA)
calcStoreLPPA = DDProdSales/DDTotSess
StoreLPPA = CSng(calcStoreLPPA)
calcEFT2 = (EFT + DDReturnEFT)
EFT2 = Ccur(calcEFT2)
calcGoalPace = (((TotWOEft/DayOfMonth * DaysMonth) + EFT2) / Goal)
GoalPace = CSng(calcGoalPace)
calcNumOfMem = (DDMysticMem + DDBuyMem)
NumofMem = CInt(calcNumofMem)
If DDNewClients = 0 THEN
ClosePercent = 0
Else
calcClosePercent = (NumofMem/DDNewClients)
ClosePercent = CSng(calcClosePercent)
End If
'TotWEft = FormatCurrency(TotWEft)
'TotWOEft = FormatCurrency(TotWOEft)
PerDayHitGoal = FormatNumber(calcPerDayHit Goal)
ClosePercent = FormatPercent(ClosePercent )
GoalPace = FormatPercent(GoalPace)
PPA = FormatNumber(PPA)
StorePPA = FormatNumber(StorePPA)
StoreLPPA = FormatNumber(StoreLPPA)
'Goal = FormatCurrency(Goal)
'EFT = FormatCurrency(EFT)
'EFT2 = FormatCurrency(EFT2)
'DSTotSales = FormatCurrency(DSTotSales)
'DDTotSales = FormatCurrency(DDTotSales)
'DDDraftDep = FormatCurrency(DDDraftDep)
'DDSalesTax = FormatCurrency(DDSalesTax)
'DDPaymentAcct = FormatCurrency(DDPaymentAc ct)
'DDInHouse = FormatCurrency(DDInHouse)
'DDGiftCerts = FormatCurrency(DDGiftCerts )
'DDReturnEft = FormatCurrency(DDReturnEft )
'DDProdSales = FormatCurrency(DDProdSales )
'DDBonusBucks = FormatCurrency(DDBonusBuck s)
'DDPrepaidDlrs = FormatCurrency(DDPrepaidDl rs)
'DDMysticSales = FormatCurrency(DDMysticSal es)
'DDPrepaidDlrs = FormatCurrency(DDPrepaidDl rs)
%>
<html>
<head>
<title>Nightly Store Numbers</title>
<script language="JavaScript1.2">
window.onload = window.resizeTo(1024,768);
</script>
<script>
function KeyPress()
{
//alert(window.event.keyCo de)
if (window.event.keyCode == 13)
window.event.keyCode =0;
}
</script>
</head>
<body background="../../MetalNew 1.jpg" bgproperties="fixed" onKeyPress="KeyPress()">
<div align="center"><font size="4"><strong><font color="#C58931" face="Tahoma">
Nightly Store Numbers</font></strong></f ont></div>
<div align="center"><strong><fo nt face="Tahoma" size="4" color="#C58931"><br>
Verification</font></stron g></div>
<FORM METHOD="POST" action="" name="NightlyStoreNumbers" >
<input type="hidden" name="isSubmitted" value="yes">
<div align="center"><b><font face="Tahoma">Date:</font> </b><font size="3" face="Tahoma"><b>
</b>
<input name="RepDate" size="10" readonly=true value="<% =RepDate %>" style="text-align: Center; font-family: Tahoma" tabindex="1"><b>
</b>
</font><font face="Tahoma"><b> </b ><font size="3"><b> Store:
<input type="text" name="StoreName" size="20" value="<% =StoreName %>" tabindex="2" style="text-align: center" readonly></b></font></font ></div>
<div align="center"> <cent er>
<table border="0" width="38%" cellspacing="1">
<tr>
<td align="center" nowrap>
<p align="right"><b><font face="Tahoma">Goal:</font> </b></td>
<td align="center" nowrap><font face="Tahoma" size="3">
<input name="Goal" size="10" readonly=true value="<% =Goal %>" style="text-align: Right; font-family: Tahoma" tabindex="3" maxlength="12" style="float: right"></font></td>
<td width="49%" align="right" nowrap colspan="2">
<p align="center"><font face="Tahoma"><b>Departmen t & Division</b></font></td>
<tr>
<td align="center" nowrap>
<p align="right"><b><font face="Tahoma">EFT:</font>< /b></td>
<td align="center" nowrap><font face="Tahoma" size="3">
<input name="EFT" size="10" readonly=true value="<% =EFT %>" style="text-align: Right; font-family: Tahoma" tabindex="4" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Total
Sales</font><font color="#000000" face="Tahoma">:</font></td >
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDTotSales" value="<% =DDTotSales %>" style="text-align: Right; font-family: Tahoma" size="10" readonly=true tabindex="15" maxlength="12" style="float: right"></font></td>
<tr>
<td align="center" nowrap colspan="2"> </td>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">Draft Deposit:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDDraftDep" size="10" readonly=true value="<% =DDDraftDep %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="16"></font></td>
<tr>
<td align="center" nowrap colspan="2">
<p align="center"><font face="Tahoma"><b>Daily Sales</b></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Sales Tax</font><font color="#000000" face="Tahoma">:</font></td >
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDSalesTax" size="10" readonly=true value="<% =DDSalesTax %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="17"></font></td>
<tr>
<td align="right" nowrap><font face="Tahoma">Sales</font> <font color="#000000" face="Tahoma">:</font></td >
<td align="right" nowrap>
<p align="center"><font face="Tahoma" size="3">
<input name="DSTotSales" size="10" readonly=true tabindex="5" value="<% =DSTotSales %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Payment
on Account</font><font color="#000000" face="Tahoma">:</font></td >
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDPaymentAcct" size="10" readonly=true value="<% =DDPaymentAcct %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="18"></font></td>
<tr>
<td width="22%" align="right" nowrap>
<font color="#000000" face="Tahoma">Sessions:</f ont></td>
<td>
<div align="center"><font face="Tahoma" size="3">
<input name="DSSessions" size="10" readonly=true value="<% =DSSessions %>" style="text-align: Right; font-family: Tahoma" tabindex="6" maxlength="12" style="float: right"></font></div>
</tr><font face="Tahoma">
<center>
</font>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">In House Charge:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDInHouse" size="10" readonly=true value="<% =DDInHouse %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="19"></font></td>
<tr>
<td width="22%" align="right" nowrap> </td>
<td>
<div align="left"><font face="Tahoma" size="3"> </font></di v>
</tr><font face="Tahoma">
<center>
</font>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">Gift Certificates:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDGiftCerts" size="10" readonly=true value="<% =DDGiftCerts %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="20"></font></td>
<tr>
<td align="right" nowrap colspan="2">
<p align="center"><font face="Tahoma"><b>Sales by Code</b></font></td>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">Returned EFT:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDReturnEFT" size="10" readonly=true value="<% =DDReturnEFT %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="21"></font></td>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Freeze:</fon t></td>
<td>
<div align="left"><font face="Tahoma" size="3"> <input type="text" name="SBCFreeze" size="10" readonly=true value="<% =SBCFreeze %>" style="text-align: Right; font-family: Tahoma" tabindex="7" maxlength="12" style="float: right"></font></div>
</tr><font face="Tahoma">
<center>
</font>
<td width="29%" align="right" nowrap><font face="Tahoma">Product Sales:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDProdSales" size="10" readonly=true value="<% =DDProdSales %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="22"></font></td>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel Regular:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanRegular" size="10" readonly=true value="<% =SBCCanRegular %>" style="text-align: Right; font-family: Tahoma" tabindex="8" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Bonus
Bucks:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDBonusBucks" size="10" readonly=true value="<% =DDBonusBucks %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="23"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel
Freeze:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanFreeze" size="10" readonly=true value="<% =SBCCanFreeze %>" style="text-align: Right; font-family: Tahoma" tabindex="9" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Prepaid
Dollars:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDPrepaidDlrs" size="10" readonly=true value="<% =DDPrepaidDlrs %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="24"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel
Mystic/Transfer:</font></t d>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanMystTran" size="10" readonly=true value="<% =SBCCanMystTran %>" style="text-align: Right; font-family: Tahoma" tabindex="10" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Mystic
Memb:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDMysticMem" size="10" readonly=true value="<% =DDMysticMem %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="25"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel EFT:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanEft" size="10" readonly=true value="<% =SBCCanEft %>" style="text-align: Right; font-family: Tahoma" tabindex="11" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Buy Memb:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDBuyMem" size="10" readonly=true value="<% =DDBuyMem %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="26"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel Transfer:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanTransfer" size="10" readonly=true value="<% =SBCCanTransfer %>" style="text-align: Right; font-family: Tahoma" tabindex="12" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Mystic
Sales:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDMysticSales" size="10" readonly=true value="<% =DDMysticSales %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="27"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap> </td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"> </font></di v>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Mystic
Sessions:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDMysticSess" size="10" readonly=true value="<% =DDMysticSess %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="28"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><b><font face="Tahoma">Days
in Month:</font></b></td>
<td width="20%" align="left" nowrap>
<font face="Tahoma" size="3">
<input name="DaysMonth" size="10" readonly=true value="<% =DaysMonth %>" style="text-align: Right; font-family: Tahoma" tabindex="13" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">New
Clients:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDNewClients" size="10" readonly=true value="<% =DDNewClients %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="29"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><b><font face="Tahoma">Days
Remaining:</font></b></td>
<td width="20%" align="left" nowrap>
<font face="Tahoma" size="3">
<input name="DaysRemain" size="10" readonly=true value="<% =DaysRemain %>" style="text-align: Right; font-family: Tahoma" tabindex="14" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Total
Sessions:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDTotSess" size="10" readonly=true value="<% =DDTotSess %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="30"></font></td>
</tr>
<tr>
<td width="90%" align="right" nowrap colspan="4">
<p align="center"><font face="Tahoma" color="#C58931"><b>
Calculated Fields</b></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">PPA.:</font> </td>
<td width="45%" align="left" nowrap colspan="2">
<font face="Tahoma" size="3">
<input name="PPA" size="10" readonly=true value="<% =PPA %>" readonly=true style="text-align: Right; font-family: Tahoma; float:none" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">EFT:</font>< /td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input name="EFT2" size="10" readonly=true value="<% =EFT2 %>" readonly=true style="text-align: Right; font-family: Tahoma; float:left" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Total w/ EFT:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input name="TotWEft" size="10" readonly=true value="<% =TotWEft %>" readonly=true style="text-align: Right; font-family: Tahoma; float:left" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Total w/o EFT:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="TotWOEft" size="10" readonly=true value="<% =TotWOEft %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="50" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Store PPA:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="StorePPA" size="10" readonly=true value="<% =StorePPA %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Store LPPA:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="StoreLPPA" size="10" readonly=true value="<% =StoreLPPA %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Per day to Hit Goal:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="PerDayHitGoal" size="10" readonly=true value="<% =PerDayHitGoal %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Goal Pace:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="GoalPace" size="10" readonly=true value="<% =GoalPace %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma"># of Memberships:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="NumOfMem" size="10" readonly=true value="<% =NumOfMem %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Close%:</fon t></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="ClosePercent" size="10" readonly=true value="<% =ClosePercent %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
</table>
<p><strong><font face="Tahoma" size="4" color="#C58931">Verificati on</font>< /strong></ p>
</center></div>
<p align="center"><font face="Tahoma">
<input type="submit" name="submit" value="Submit" onClick="document.NightlyS toreNumber s.action=' NightlySto reNumbers3 .asp';">
</form>
</body>
</html>
NightlyStoreNumbers3.asp
<%
Dim RepDate,StoreName,Goal,EFT ,DSTotSale s,DSSessio ns,DDTotSa les,DDDraf tDep,DDSal esTax,DDPa ymentAcct, DDInHouse, DDGiftCert s,DDReturn EFT,DDProd Sales,DDBo nusBucks
Dim DDPrepaidDlrs,DDMysticMem, DDBuyMem,D DMysticSal es,DDMysti cSess,DDNe wClients,D DTotSess,S BCFreeze,S BCCanRegul ar,SBCCanF reeze,SBCC anMystTran ,SBCCanEft
Dim SBCCanTransfer,DaysMonth,D aysRemain
Dim PPA,EFT2,TotWEft,TotWOEft, StorePPA,S toreLPPA,P erDayHitGo al,GoalPac e,NumOfMem ,ClosePerc ent,IncrDr aft
Dim calPPA,calTotWEft,calTotWO Eft,calSto rePPA,calS toreLPPA,c alPerDayHi tGoal,calG oalPace,ca lNumOfMem, calClosePe rcent
Dim ConDB, rsNumbers, strSQL, strAdd
RepDate = Request.Form("RepDate")
StoreName = Request.Form("StoreName")
Goal = Request.Form("Goal")
EFT = Request.Form("EFT")
DSTotSales = Request.Form("DSTotSales")
DSSessions = Request.Form("DSSessions")
DDTotSales = Request.Form("DDTotSales")
DDDraftDep = Request.Form("DDDraftDep")
DDSalesTax = Request.Form("DDSalesTax")
DDPaymentAcct = Request.Form("DDPaymentAcc t")
DDInHouse = Request.Form("DDInHouse")
DDGiftCerts = Request.Form("DDGiftCerts" )
DDReturnEFT = Request.Form("DDReturnEFT" )
DDProdSales = Request.Form("DDProdSales" )
DDBonusBucks = Request.Form("DDBonusBucks ")
DDPrepaidDlrs = Request.Form("DDPrepaidDlr s")
DDMysticMem = Request.Form("DDMysticMem" )
DDBuyMem = Request.Form("DDBuyMem")
DDMysticSales = Request.Form("DDMysticSale s")
DDMysticSess = Request.Form("DDMysticSess ")
DDNewClients = Request.Form("DDNewClients ")
DDTotSess = Request.Form("DDTotSess")
SBCFreeze = Request.Form("SBCFreeze")
SBCCanRegular = Request.Form("SBCCanRegula r")
SBCCanFreeze = Request.Form("SBCCanFreeze ")
SBCCanMystTran = Request.Form("SBCCanMystTr an")
SBCCanEft = Request.Form("SBCCanEft")
SBCCanTransfer = Request.Form("SBCCanTransf er")
DaysMonth = Request.Form("DaysMonth")
DaysRemain = Request.Form("DaysRemain")
NumOfMem = Request.Form("NumOfMem")
ClosePercent = Request.Form("ClosePercent ")
PPA = Request.Form("PPA")
PPA = FormatCurrency(PPA)
EFT2 = Request.Form("EFT2")
EFT2 = FormatNumber(EFT2)
TotWEft = Request.Form("TotWEft")
TotWEFT = FormatNumber(TotWEft)
TotWOEft = Request.Form("TotWOEft")
TotWOEft = FormatNumber(TotWOEft)
StorePPA = Request.Form("StorePPA")
StorePPA = FormatCurrency(StorePPA)
StoreLPPA = Request.Form("StoreLPPA")
StoreLPPA = FormatCurrency(StoreLPPA)
PerDayHitGoal = Request.Form("PerDayHitGoa l")
PerDayHitGoal = FormatNumber(PerDayHitGoal )
GoalPace = Request.Form("GoalPace")
GoalPace = FormatNumber(GoalPace,2) * 100
NunOfMem = Request.Form("NumOfMem")
NumOfMem = FormatNumber(NumOfMem)
ClosePercent = Request.Form("ClosePercent ")
ClosePercent = FormatNumber(ClosePercent, 2) * 100
strSQL = "INSERT INTO NightlyNumbers1(RepDate,St oreName,Go al,DSTotSa les,DSSess ions,PPA,E FT,TotWEft ,TotWOEft, DDNewClien ts,DDTotSe ss,StorePP A,DDProdSa les,StoreL PPA,DDMyst icSess,DDM ysticSales ,PerDayHit Goal,GoalP ace,NumOfM em,ClosePe rcent,DDTo tSales,DDD raftDep,DD SalesTax,D DPaymentAc ct,DDInHou se,DDGiftC erts,DDRet urnEFT,DDB onusBucks, DDPrepaidD lrs,DDMyst icMem,DDBu yMem,SBCFr eeze,SBCCa nRegular,S BCCanFreez e,SBCCanMy stTran,SBC CanEft,SBC CanTransfe r,DaysMont h,DaysRema in,EFT2) " & _
"VALUES('" & RepDate & "','" & StoreName & "',CONVERT(money,'" & Goal & "'),CONVERT(money,'" & DSTotSales & "'),'" & DSSessions & "',CONVERT(money,'" & PPA & "'),CONVERT(money,'" & EFT & "'),CONVERT(money,'" & TotWEft & "'),CONVERT(money,'" & TotWOEft & "'),'" & DDNewClients & "','" & DDTotSess & "',CONVERT(money,'" & StorePPA & "'),CONVERT(money,'" & DDProdSales & "'),CONVERT(money,'" & StoreLPPA & "'),'" & _
DDMysticSess & "',CONVERT(money,'" & DDMysticSales & "'),CONVERT(money,'" & PerDayHitGoal & "'),'" & GoalPace & "','" & NumOfMem & "','" & ClosePercent & "',CONVERT(money,'" & DDTotSales & "'),CONVERT(money,'" & DDDraftDep & "'),CONVERT(money,'" & DDSalesTax & "'),CONVERT(money,'" & DDPaymentAcct & "'),CONVERT(money,'" & DDInHouse & "'),CONVERT(money,'" & DDGiftCerts & "'),CONVERT(money,'" & DDReturnEFT & "'),CONVERT(money,'" & DDBonusBucks & "'),CONVERT(money,'" & DDPrepaidDlrs & "'),'" & _
DDMysticMem & "','" & DDBuyMem & "','" & SBCFreeze & "','" & SBCCanRegular & "','" & SBCCanFreeze & "','" & SBCCanMystTran & "','" & SBCCanEFT & "','" & SBCCanTransfer & "','" & DaysMonth & "','" & DaysRemain & "',CONVERT(money,'" & EFT2 & "'));"
Set conDB = Server.CreateObject("ADODB .Connectio n")
conDB.Open "Provider=sqloledb;" & _
"Data Source=database-server;" & _
"Initial Catalog=CorpWeb;" & _
"User Id=empnum;" & _
"Password=*****"
On Error Resume Next
Set strAdd = ConDB.Execute(strSQL)
If Err.Number <> 0 Then
Response.Write "<body background='../images/Meta lNew1.jpg' style='background-attachme nt: fixed'>"
Response.Write "<p><b><font face='Tahoma' color='#C58931'>The following Error has occured:</font></b></p>"
Response.Write "Number: " & Err.Number & "<br><br>"
Response.Write "<b>Description: " & Err.Description & "</br><br>"
Response.Write "<p><font face='Tahoma' color='#C58931'><a href='NightlyStoreNumbers. asp' target='_self' style>Try again</a></font></p>"
Err.Clear
Else
%>
<html>
<head>
<title></title>
<style>
a { text-decoration: none }
a { text-decoration: none }
</style>
<script language="JavaScript1.2">
window.onload = window.resizeTo(1024,768);
</script>
</head>
<body background="../../images/M etalNew1.j pg" style="background-attachme nt: fixed">
<H3><font face="Tahoma">Nightly Numbers Added</font></H3>
<P><font face="Tahoma">The following store's Nightly Numbers were added to the database for the date of  <% =RepDate %> :</font></P>
<TABLE>
<TR>
<TH ALIGN=RIGHT><font face="Tahoma">Store:</font ></TH>
<TD ALIGN=LEFT><font face="Tahoma"><% =StoreName %></font></TD>
</TR>
</TABLE>
<p><font face="Tahoma"><a href="NightlyStoreNumbers. asp" target="_self" style>Return</a></font></p >
<% End If %>
TIA,
Andrew
ERROR:
Cannot convert a char value to money. The char value has incorrect syntax??
CODE:
NightlyStoreNumbers2.asp
<%
Dim RepDate,StoreName,Goal,EFT
Dim DDPrepaidDlrs,DDMysticMem,
Dim SBCCanTransfer,DaysMonth,D
Dim PPA,TotWEft,TotWOEft,Store
Dim calPPA,calTotWEft,calTotWO
Dim DayofMonth, calcEFT2
RepDate = Request.Form("RepDate")
StoreName = Request.Form("StoreName")
Goal = Request.Form("Goal")
Goal = Ccur(Goal)
EFT = Request.Form("EFT")
EFT = Ccur(EFT)
DSTotSales = Request.Form("DSTotSales")
DSTotSales = Ccur(DSTotSales)
DSSessions = Request.Form("DSSessions")
DSSessions = CInt(DSSessions)
DDTotSales = Request.Form("DDTotSales")
DDTotSales = Ccur(DDTotSales)
DDDraftDep = Request.Form("DDDraftDep")
DDDraftDep = Ccur(DDDraftDep)
DDSalesTax = Request.Form("DDSalesTax")
DDSalesTax = Ccur(DDSalesTax)
DDPaymentAcct = Request.Form("DDPaymentAcc
DDPaymentAcct = Ccur(DDPaymentAcct)
DDInHouse = Request.Form("DDInHouse")
DDInHouse = Ccur(DDInHouse)
DDGiftCerts = Request.Form("DDGiftCerts"
DDGiftCerts = Ccur(DDGiftCerts)
DDReturnEFT = Request.Form("DDReturnEFT"
DDReturnEFT = Ccur(DDReturnEFT)
DDProdSales = Request.Form("DDProdSales"
DDProdSales = Ccur(DDProdSales)
DDBonusBucks = Request.Form("DDBonusBucks
DDBonusBucks = Ccur(DDBonusBucks)
DDPrepaidDlrs = Request.Form("DDPrepaidDlr
DDPrepaidDlrs = Ccur(DDPrepaidDlrs)
DDMysticMem = Request.Form("DDMysticMem"
DDMysticMem = CInt(DDMysticMem)
DDBuyMem = Request.Form("DDBuyMem")
DDBuyMem = CInt(DDBuyMem)
DDMysticSales = Request.Form("DDMysticSale
DDMysticSales = Ccur(DDMysticSales)
DDMysticSess = Request.Form("DDMysticSess
DDMysticSess = CInt(DDMysticSess)
DDNewClients = Request.Form("DDNewClients
DDNewClients = CInt(DDNewClients)
DDTotSess = Request.Form("DDTotSess")
DDTotSess = CInt(DDTotSess)
SBCFreeze = Request.Form("SBCFreeze")
SBCFreeze = CInt(SBCFreeze)
SBCCanRegular = Request.Form("SBCCanRegula
SBCCanRegular = CInt(SBCCanRegular)
SBCCanFreeze = Request.Form("SBCCanFreeze
SBCCanFreeze = CInt(SBCCanFreeze)
SBCCanMystTran = Request.Form("SBCCanMystTr
SBCCanMystTran = CInt(SBCCanMystTran)
SBCCanEft = Request.Form("SBCCanEft")
SBCCanEft = CInt(SBCCanEft)
SBCCanTransfer = Request.Form("SBCCanTransf
SBCCanTransfer = CInt(SBCCanTransfer)
DaysMonth = Request.Form("DaysMonth")
DaysMonth = CInt(DaysMonth)
DaysRemain = Request.Form("DaysRemain")
DaysRemain = CInt(DaysRemain)
DayofMonth = Datepart("d",RepDate)
DayofMonth = CInt(DayofMonth)
calPPA = DSTotSales/DSSessions
PPA = CSng(calPPA)
calcTotWOEft = DDTotSales - DDDraftDep - DDInHouse - DDGiftCerts - DDReturnEFT - DDBonusBucks - DDPrepaidDlrs
TotWOEft = Ccur(calcTotWOEft)
calcTotWEft = Ccur(EFT + DDReturnEFT + TotWOEft)
TotWEft = Ccur(calcTotWEft)
calcPerDayHitGoal = (Goal - TotWEft) / DaysRemain
PerDayHitGoal = Ccur(calcPerDayHitGoal)
calcStorePPA = (TotWOEft/DDTotSess)
StorePPA = CSng(calcStorePPA)
calcStoreLPPA = DDProdSales/DDTotSess
StoreLPPA = CSng(calcStoreLPPA)
calcEFT2 = (EFT + DDReturnEFT)
EFT2 = Ccur(calcEFT2)
calcGoalPace = (((TotWOEft/DayOfMonth * DaysMonth) + EFT2) / Goal)
GoalPace = CSng(calcGoalPace)
calcNumOfMem = (DDMysticMem + DDBuyMem)
NumofMem = CInt(calcNumofMem)
If DDNewClients = 0 THEN
ClosePercent = 0
Else
calcClosePercent = (NumofMem/DDNewClients)
ClosePercent = CSng(calcClosePercent)
End If
'TotWEft = FormatCurrency(TotWEft)
'TotWOEft = FormatCurrency(TotWOEft)
PerDayHitGoal = FormatNumber(calcPerDayHit
ClosePercent = FormatPercent(ClosePercent
GoalPace = FormatPercent(GoalPace)
PPA = FormatNumber(PPA)
StorePPA = FormatNumber(StorePPA)
StoreLPPA = FormatNumber(StoreLPPA)
'Goal = FormatCurrency(Goal)
'EFT = FormatCurrency(EFT)
'EFT2 = FormatCurrency(EFT2)
'DSTotSales = FormatCurrency(DSTotSales)
'DDTotSales = FormatCurrency(DDTotSales)
'DDDraftDep = FormatCurrency(DDDraftDep)
'DDSalesTax = FormatCurrency(DDSalesTax)
'DDPaymentAcct = FormatCurrency(DDPaymentAc
'DDInHouse = FormatCurrency(DDInHouse)
'DDGiftCerts = FormatCurrency(DDGiftCerts
'DDReturnEft = FormatCurrency(DDReturnEft
'DDProdSales = FormatCurrency(DDProdSales
'DDBonusBucks = FormatCurrency(DDBonusBuck
'DDPrepaidDlrs = FormatCurrency(DDPrepaidDl
'DDMysticSales = FormatCurrency(DDMysticSal
'DDPrepaidDlrs = FormatCurrency(DDPrepaidDl
%>
<html>
<head>
<title>Nightly Store Numbers</title>
<script language="JavaScript1.2">
window.onload = window.resizeTo(1024,768);
</script>
<script>
function KeyPress()
{
//alert(window.event.keyCo
if (window.event.keyCode == 13)
window.event.keyCode =0;
}
</script>
</head>
<body background="../../MetalNew
<div align="center"><font size="4"><strong><font color="#C58931" face="Tahoma">
Nightly Store Numbers</font></strong></f
<div align="center"><strong><fo
Verification</font></stron
<FORM METHOD="POST" action="" name="NightlyStoreNumbers"
<input type="hidden" name="isSubmitted" value="yes">
<div align="center"><b><font face="Tahoma">Date:</font>
</b>
<input name="RepDate" size="10" readonly=true value="<% =RepDate %>" style="text-align: Center; font-family: Tahoma" tabindex="1"><b>
</b>
</font><font face="Tahoma"><b> </b
<input type="text" name="StoreName" size="20" value="<% =StoreName %>" tabindex="2" style="text-align: center" readonly></b></font></font
<div align="center"> <cent
<table border="0" width="38%" cellspacing="1">
<tr>
<td align="center" nowrap>
<p align="right"><b><font face="Tahoma">Goal:</font>
<td align="center" nowrap><font face="Tahoma" size="3">
<input name="Goal" size="10" readonly=true value="<% =Goal %>" style="text-align: Right; font-family: Tahoma" tabindex="3" maxlength="12" style="float: right"></font></td>
<td width="49%" align="right" nowrap colspan="2">
<p align="center"><font face="Tahoma"><b>Departmen
<tr>
<td align="center" nowrap>
<p align="right"><b><font face="Tahoma">EFT:</font><
<td align="center" nowrap><font face="Tahoma" size="3">
<input name="EFT" size="10" readonly=true value="<% =EFT %>" style="text-align: Right; font-family: Tahoma" tabindex="4" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Total
Sales</font><font color="#000000" face="Tahoma">:</font></td
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDTotSales" value="<% =DDTotSales %>" style="text-align: Right; font-family: Tahoma" size="10" readonly=true tabindex="15" maxlength="12" style="float: right"></font></td>
<tr>
<td align="center" nowrap colspan="2"> </td>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">Draft Deposit:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDDraftDep" size="10" readonly=true value="<% =DDDraftDep %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="16"></font></td>
<tr>
<td align="center" nowrap colspan="2">
<p align="center"><font face="Tahoma"><b>Daily Sales</b></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Sales Tax</font><font color="#000000" face="Tahoma">:</font></td
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDSalesTax" size="10" readonly=true value="<% =DDSalesTax %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="17"></font></td>
<tr>
<td align="right" nowrap><font face="Tahoma">Sales</font>
<td align="right" nowrap>
<p align="center"><font face="Tahoma" size="3">
<input name="DSTotSales" size="10" readonly=true tabindex="5" value="<% =DSTotSales %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Payment
on Account</font><font color="#000000" face="Tahoma">:</font></td
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDPaymentAcct" size="10" readonly=true value="<% =DDPaymentAcct %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="18"></font></td>
<tr>
<td width="22%" align="right" nowrap>
<font color="#000000" face="Tahoma">Sessions:</f
<td>
<div align="center"><font face="Tahoma" size="3">
<input name="DSSessions" size="10" readonly=true value="<% =DSSessions %>" style="text-align: Right; font-family: Tahoma" tabindex="6" maxlength="12" style="float: right"></font></div>
</tr><font face="Tahoma">
<center>
</font>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">In House Charge:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDInHouse" size="10" readonly=true value="<% =DDInHouse %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="19"></font></td>
<tr>
<td width="22%" align="right" nowrap> </td>
<td>
<div align="left"><font face="Tahoma" size="3"> </font></di
</tr><font face="Tahoma">
<center>
</font>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">Gift Certificates:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDGiftCerts" size="10" readonly=true value="<% =DDGiftCerts %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="20"></font></td>
<tr>
<td align="right" nowrap colspan="2">
<p align="center"><font face="Tahoma"><b>Sales by Code</b></font></td>
<td width="29%" align="right" nowrap>
<font color="#000000" face="Tahoma">Returned EFT:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDReturnEFT" size="10" readonly=true value="<% =DDReturnEFT %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="21"></font></td>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Freeze:</fon
<td>
<div align="left"><font face="Tahoma" size="3"> <input type="text" name="SBCFreeze" size="10" readonly=true value="<% =SBCFreeze %>" style="text-align: Right; font-family: Tahoma" tabindex="7" maxlength="12" style="float: right"></font></div>
</tr><font face="Tahoma">
<center>
</font>
<td width="29%" align="right" nowrap><font face="Tahoma">Product Sales:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDProdSales" size="10" readonly=true value="<% =DDProdSales %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="22"></font></td>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel Regular:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanRegular" size="10" readonly=true value="<% =SBCCanRegular %>" style="text-align: Right; font-family: Tahoma" tabindex="8" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Bonus
Bucks:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDBonusBucks" size="10" readonly=true value="<% =DDBonusBucks %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="23"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel
Freeze:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanFreeze" size="10" readonly=true value="<% =SBCCanFreeze %>" style="text-align: Right; font-family: Tahoma" tabindex="9" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Prepaid
Dollars:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDPrepaidDlrs" size="10" readonly=true value="<% =DDPrepaidDlrs %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="24"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel
Mystic/Transfer:</font></t
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanMystTran" size="10" readonly=true value="<% =SBCCanMystTran %>" style="text-align: Right; font-family: Tahoma" tabindex="10" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Mystic
Memb:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDMysticMem" size="10" readonly=true value="<% =DDMysticMem %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="25"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel EFT:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanEft" size="10" readonly=true value="<% =SBCCanEft %>" style="text-align: Right; font-family: Tahoma" tabindex="11" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Buy Memb:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDBuyMem" size="10" readonly=true value="<% =DDBuyMem %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="26"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><font face="Tahoma">Cancel Transfer:</font></td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"><input type="text" name="SBCCanTransfer" size="10" readonly=true value="<% =SBCCanTransfer %>" style="text-align: Right; font-family: Tahoma" tabindex="12" maxlength="12" style="float: right"></font></div>
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Mystic
Sales:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDMysticSales" size="10" readonly=true value="<% =DDMysticSales %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="27"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap> </td>
<td width="20%" align="left" nowrap>
<div align="left"><font face="Tahoma" size="3"> </font></di
</td>
<td width="29%" align="right" nowrap><font face="Tahoma">Mystic
Sessions:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDMysticSess" size="10" readonly=true value="<% =DDMysticSess %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="28"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><b><font face="Tahoma">Days
in Month:</font></b></td>
<td width="20%" align="left" nowrap>
<font face="Tahoma" size="3">
<input name="DaysMonth" size="10" readonly=true value="<% =DaysMonth %>" style="text-align: Right; font-family: Tahoma" tabindex="13" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">New
Clients:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDNewClients" size="10" readonly=true value="<% =DDNewClients %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="29"></font></td>
</tr>
<tr>
<td width="22%" align="right" nowrap><b><font face="Tahoma">Days
Remaining:</font></b></td>
<td width="20%" align="left" nowrap>
<font face="Tahoma" size="3">
<input name="DaysRemain" size="10" readonly=true value="<% =DaysRemain %>" style="text-align: Right; font-family: Tahoma" tabindex="14" maxlength="12" style="float: right"></font></td>
<td width="29%" align="right" nowrap><font face="Tahoma">Total
Sessions:</font></td>
<td width="19%" align="right" nowrap>
<font face="Tahoma" size="3">
<input type="text" name="DDTotSess" size="10" readonly=true value="<% =DDTotSess %>" style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: right" tabindex="30"></font></td>
</tr>
<tr>
<td width="90%" align="right" nowrap colspan="4">
<p align="center"><font face="Tahoma" color="#C58931"><b>
Calculated Fields</b></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">PPA.:</font>
<td width="45%" align="left" nowrap colspan="2">
<font face="Tahoma" size="3">
<input name="PPA" size="10" readonly=true value="<% =PPA %>" readonly=true style="text-align: Right; font-family: Tahoma; float:none" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">EFT:</font><
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input name="EFT2" size="10" readonly=true value="<% =EFT2 %>" readonly=true style="text-align: Right; font-family: Tahoma; float:left" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Total w/ EFT:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input name="TotWEft" size="10" readonly=true value="<% =TotWEft %>" readonly=true style="text-align: Right; font-family: Tahoma; float:left" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Total w/o EFT:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="TotWOEft" size="10" readonly=true value="<% =TotWOEft %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="50" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Store PPA:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="StorePPA" size="10" readonly=true value="<% =StorePPA %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Store LPPA:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="StoreLPPA" size="10" readonly=true value="<% =StoreLPPA %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Per day to Hit Goal:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="PerDayHitGoal" size="10" readonly=true value="<% =PerDayHitGoal %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Goal Pace:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="GoalPace" size="10" readonly=true value="<% =GoalPace %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma"># of Memberships:</font></td>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="NumOfMem" size="10" readonly=true value="<% =NumOfMem %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
<tr>
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma">Close%:</fon
<td width="45%" align="right" nowrap colspan="2">
<font face="Tahoma" size="3">
<input type="text" name="ClosePercent" size="10" readonly=true value="<% =ClosePercent %>" readonly=true style="text-align: Right; font-family: Tahoma" maxlength="12" style="float: left" tabindex="30"></font></td>
</tr>
</table>
<p><strong><font face="Tahoma" size="4" color="#C58931">Verificati
</center></div>
<p align="center"><font face="Tahoma">
<input type="submit" name="submit" value="Submit" onClick="document.NightlyS
</form>
</body>
</html>
NightlyStoreNumbers3.asp
<%
Dim RepDate,StoreName,Goal,EFT
Dim DDPrepaidDlrs,DDMysticMem,
Dim SBCCanTransfer,DaysMonth,D
Dim PPA,EFT2,TotWEft,TotWOEft,
Dim calPPA,calTotWEft,calTotWO
Dim ConDB, rsNumbers, strSQL, strAdd
RepDate = Request.Form("RepDate")
StoreName = Request.Form("StoreName")
Goal = Request.Form("Goal")
EFT = Request.Form("EFT")
DSTotSales = Request.Form("DSTotSales")
DSSessions = Request.Form("DSSessions")
DDTotSales = Request.Form("DDTotSales")
DDDraftDep = Request.Form("DDDraftDep")
DDSalesTax = Request.Form("DDSalesTax")
DDPaymentAcct = Request.Form("DDPaymentAcc
DDInHouse = Request.Form("DDInHouse")
DDGiftCerts = Request.Form("DDGiftCerts"
DDReturnEFT = Request.Form("DDReturnEFT"
DDProdSales = Request.Form("DDProdSales"
DDBonusBucks = Request.Form("DDBonusBucks
DDPrepaidDlrs = Request.Form("DDPrepaidDlr
DDMysticMem = Request.Form("DDMysticMem"
DDBuyMem = Request.Form("DDBuyMem")
DDMysticSales = Request.Form("DDMysticSale
DDMysticSess = Request.Form("DDMysticSess
DDNewClients = Request.Form("DDNewClients
DDTotSess = Request.Form("DDTotSess")
SBCFreeze = Request.Form("SBCFreeze")
SBCCanRegular = Request.Form("SBCCanRegula
SBCCanFreeze = Request.Form("SBCCanFreeze
SBCCanMystTran = Request.Form("SBCCanMystTr
SBCCanEft = Request.Form("SBCCanEft")
SBCCanTransfer = Request.Form("SBCCanTransf
DaysMonth = Request.Form("DaysMonth")
DaysRemain = Request.Form("DaysRemain")
NumOfMem = Request.Form("NumOfMem")
ClosePercent = Request.Form("ClosePercent
PPA = Request.Form("PPA")
PPA = FormatCurrency(PPA)
EFT2 = Request.Form("EFT2")
EFT2 = FormatNumber(EFT2)
TotWEft = Request.Form("TotWEft")
TotWEFT = FormatNumber(TotWEft)
TotWOEft = Request.Form("TotWOEft")
TotWOEft = FormatNumber(TotWOEft)
StorePPA = Request.Form("StorePPA")
StorePPA = FormatCurrency(StorePPA)
StoreLPPA = Request.Form("StoreLPPA")
StoreLPPA = FormatCurrency(StoreLPPA)
PerDayHitGoal = Request.Form("PerDayHitGoa
PerDayHitGoal = FormatNumber(PerDayHitGoal
GoalPace = Request.Form("GoalPace")
GoalPace = FormatNumber(GoalPace,2) * 100
NunOfMem = Request.Form("NumOfMem")
NumOfMem = FormatNumber(NumOfMem)
ClosePercent = Request.Form("ClosePercent
ClosePercent = FormatNumber(ClosePercent,
strSQL = "INSERT INTO NightlyNumbers1(RepDate,St
"VALUES('" & RepDate & "','" & StoreName & "',CONVERT(money,'" & Goal & "'),CONVERT(money,'" & DSTotSales & "'),'" & DSSessions & "',CONVERT(money,'" & PPA & "'),CONVERT(money,'" & EFT & "'),CONVERT(money,'" & TotWEft & "'),CONVERT(money,'" & TotWOEft & "'),'" & DDNewClients & "','" & DDTotSess & "',CONVERT(money,'" & StorePPA & "'),CONVERT(money,'" & DDProdSales & "'),CONVERT(money,'" & StoreLPPA & "'),'" & _
DDMysticSess & "',CONVERT(money,'" & DDMysticSales & "'),CONVERT(money,'" & PerDayHitGoal & "'),'" & GoalPace & "','" & NumOfMem & "','" & ClosePercent & "',CONVERT(money,'" & DDTotSales & "'),CONVERT(money,'" & DDDraftDep & "'),CONVERT(money,'" & DDSalesTax & "'),CONVERT(money,'" & DDPaymentAcct & "'),CONVERT(money,'" & DDInHouse & "'),CONVERT(money,'" & DDGiftCerts & "'),CONVERT(money,'" & DDReturnEFT & "'),CONVERT(money,'" & DDBonusBucks & "'),CONVERT(money,'" & DDPrepaidDlrs & "'),'" & _
DDMysticMem & "','" & DDBuyMem & "','" & SBCFreeze & "','" & SBCCanRegular & "','" & SBCCanFreeze & "','" & SBCCanMystTran & "','" & SBCCanEFT & "','" & SBCCanTransfer & "','" & DaysMonth & "','" & DaysRemain & "',CONVERT(money,'" & EFT2 & "'));"
Set conDB = Server.CreateObject("ADODB
conDB.Open "Provider=sqloledb;" & _
"Data Source=database-server;" & _
"Initial Catalog=CorpWeb;" & _
"User Id=empnum;" & _
"Password=*****"
On Error Resume Next
Set strAdd = ConDB.Execute(strSQL)
If Err.Number <> 0 Then
Response.Write "<body background='../images/Meta
Response.Write "<p><b><font face='Tahoma' color='#C58931'>The following Error has occured:</font></b></p>"
Response.Write "Number: " & Err.Number & "<br><br>"
Response.Write "<b>Description: " & Err.Description & "</br><br>"
Response.Write "<p><font face='Tahoma' color='#C58931'><a href='NightlyStoreNumbers.
Err.Clear
Else
%>
<html>
<head>
<title></title>
<style>
a { text-decoration: none }
a { text-decoration: none }
</style>
<script language="JavaScript1.2">
window.onload = window.resizeTo(1024,768);
</script>
</head>
<body background="../../images/M
<H3><font face="Tahoma">Nightly Numbers Added</font></H3>
<P><font face="Tahoma">The following store's Nightly Numbers were added to the database for the date of  <% =RepDate %> :</font></P>
<TABLE>
<TR>
<TH ALIGN=RIGHT><font face="Tahoma">Store:</font
<TD ALIGN=LEFT><font face="Tahoma"><% =StoreName %></font></TD>
</TR>
</TABLE>
<p><font face="Tahoma"><a href="NightlyStoreNumbers.
<% End If %>
TIA,
Andrew
it doesn't throw a line number at you with the error?
@Ahelbling
Which line number and which line in the code are you getting this error on. Also please paste the string that you are passing to the variable where you are getting this error, we cannot assume what you are passing to that particular variable.
Which line number and which line in the code are you getting this error on. Also please paste the string that you are passing to the variable where you are getting this error, we cannot assume what you are passing to that particular variable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try replacing your insert statement with the below one...
strSQL = "INSERT INTO NightlyNumbers1(RepDate,St oreName,Go al,DSTotSa les,DSSess ions,PPA,E FT,TotWEft ,TotWOEft, DDNewClien ts,DDTotSe ss,StorePP A,DDProdSa les,StoreL PPA,DDMyst icSess,DDM ysticSales ,PerDayHit Goal,GoalP ace,NumOfM em,ClosePe rcent,DDTo tSales,DDD raftDep,DD SalesTax,D DPaymentAc ct,DDInHou se,DDGiftC erts,DDRet urnEFT,DDB onusBucks, DDPrepaidD lrs,DDMyst icMem,DDBu yMem,SBCFr eeze,SBCCa nRegular,S BCCanFreez e,SBCCanMy stTran,SBC CanEft,SBC CanTransfe r,DaysMont h,DaysRema in,EFT2) " & _
"VALUES('" & RepDate & "','" & StoreName & "',CAST('" & Goal & "' as money),CAST('" & DSTotSales & "' as money),'" & DSSessions & "',CAST('" & PPA & "' as money),CAST('" & EFT & "' as money),CAST('" & TotWEft & "' as money),CAST('" & TotWOEft & "' as money),'" & DDNewClients & "','" & DDTotSess & "',CAST('" & StorePPA & "' as money),CAST('" & DDProdSales & "' as money),CAST('" & StoreLPPA & "' as money),'" & _
DDMysticSess & "',CAST('" & DDMysticSales & "' as money),CAST('" & PerDayHitGoal & "' as money),'" & GoalPace & "','" & NumOfMem & "','" & ClosePercent & "',CAST('" & DDTotSales & "' as money),CAST('" & DDDraftDep & "' as money),CAST('" & DDSalesTax & "' as money),CAST('" & DDPaymentAcct & "' as money),CAST('" & DDInHouse & "' as money),CAST('" & DDGiftCerts & "' as money),CAST('" & DDReturnEFT & "' as money),CAST('" & DDBonusBucks & "' as money),CAST('" & DDPrepaidDlrs & "' as money),'" & _
DDMysticMem & "','" & DDBuyMem & "','" & SBCFreeze & "','" & SBCCanRegular & "','" & SBCCanFreeze & "','" & SBCCanMystTran & "','" & SBCCanEFT & "','" & SBCCanTransfer & "','" & DaysMonth & "','" & DaysRemain & "',CAST(money,'" & EFT2 & "'));"
strSQL = "INSERT INTO NightlyNumbers1(RepDate,St
"VALUES('" & RepDate & "','" & StoreName & "',CAST('" & Goal & "' as money),CAST('" & DSTotSales & "' as money),'" & DSSessions & "',CAST('" & PPA & "' as money),CAST('" & EFT & "' as money),CAST('" & TotWEft & "' as money),CAST('" & TotWOEft & "' as money),'" & DDNewClients & "','" & DDTotSess & "',CAST('" & StorePPA & "' as money),CAST('" & DDProdSales & "' as money),CAST('" & StoreLPPA & "' as money),'" & _
DDMysticSess & "',CAST('" & DDMysticSales & "' as money),CAST('" & PerDayHitGoal & "' as money),'" & GoalPace & "','" & NumOfMem & "','" & ClosePercent & "',CAST('" & DDTotSales & "' as money),CAST('" & DDDraftDep & "' as money),CAST('" & DDSalesTax & "' as money),CAST('" & DDPaymentAcct & "' as money),CAST('" & DDInHouse & "' as money),CAST('" & DDGiftCerts & "' as money),CAST('" & DDReturnEFT & "' as money),CAST('" & DDBonusBucks & "' as money),CAST('" & DDPrepaidDlrs & "' as money),'" & _
DDMysticMem & "','" & DDBuyMem & "','" & SBCFreeze & "','" & SBCCanRegular & "','" & SBCCanFreeze & "','" & SBCCanMystTran & "','" & SBCCanEFT & "','" & SBCCanTransfer & "','" & DaysMonth & "','" & DaysRemain & "',CAST(money,'" & EFT2 & "'));"
ASKER
@bugs:
Number: -2147217900
Description: The name 'money' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Number: -2147217900
Description: The name 'money' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
ASKER
@all:
DSTotSales = -1149.31
and
PPA = -26.73
DSTotSales = -1149.31
and
PPA = -26.73
ASKER
@ all:
Microsoft OLE DB Provider for SQL Server error '80040e07'
Cannot convert a char value to money. The char value has incorrect syntax.
/tancoweb/DailyReport/TEST /NightlySt oreNumbers 3.asp, line 92
Microsoft OLE DB Provider for SQL Server error '80040e07'
Cannot convert a char value to money. The char value has incorrect syntax.
/tancoweb/DailyReport/TEST
ASKER
@bugs:
Microsoft OLE DB Provider for SQL Server error '80040e14'
The name 'money' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
/tancoweb/DailyReport/TEST /NightlySt oreNumbers 3.asp, line 91
Microsoft OLE DB Provider for SQL Server error '80040e14'
The name 'money' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
/tancoweb/DailyReport/TEST
ASKER
I also just noticed that the SQL table has the fields PPA and DSTotSales as type MONEY. Could this be a problem with trying to throw -26.73 and -1149.31 in there?
ASKER
@all:
If i change the DSTotSales to a positive 1149.31, it works. So it is definitely the neagative -1149.31 that is breaking this.
If i change the DSTotSales to a positive 1149.31, it works. So it is definitely the neagative -1149.31 that is breaking this.
ASKER
@all:
I got it working - not sure exactly what the effects will be down the road, but it writes to the DB now and the reports look good.
added: DSTotSales = FormatNumber(DSTotSales)
changed: PPA = Request.Form("PPA")
PPA = FormatNumber(PPA)
New Code:
NightlyStoreNumbers3.asp
<%
Dim RepDate,StoreName,Goal,EFT ,DSTotSale s,DSSessio ns,DDTotSa les,DDDraf tDep,DDSal esTax,DDPa ymentAcct, DDInHouse, DDGiftCert s,DDReturn EFT,DDProd Sales,DDBo nusBucks
Dim DDPrepaidDlrs,DDMysticMem, DDBuyMem,D DMysticSal es,DDMysti cSess,DDNe wClients,D DTotSess,S BCFreeze,S BCCanRegul ar,SBCCanF reeze,SBCC anMystTran ,SBCCanEft
Dim SBCCanTransfer,DaysMonth,D aysRemain
Dim PPA,EFT2,TotWEft,TotWOEft, StorePPA,S toreLPPA,P erDayHitGo al,GoalPac e,NumOfMem ,ClosePerc ent,IncrDr aft
Dim calPPA,calTotWEft,calTotWO Eft,calSto rePPA,calS toreLPPA,c alPerDayHi tGoal,calG oalPace,ca lNumOfMem, calClosePe rcent
Dim ConDB, rsNumbers, strSQL, strAdd
RepDate = Request.Form("RepDate")
StoreName = Request.Form("StoreName")
Goal = Request.Form("Goal")
EFT = Request.Form("EFT")
DSTotSales = Request.Form("DSTotSales")
DSSessions = Request.Form("DSSessions")
DDTotSales = Request.Form("DDTotSales")
DDDraftDep = Request.Form("DDDraftDep")
DDSalesTax = Request.Form("DDSalesTax")
DDPaymentAcct = Request.Form("DDPaymentAcc t")
DDInHouse = Request.Form("DDInHouse")
DDGiftCerts = Request.Form("DDGiftCerts" )
DDReturnEFT = Request.Form("DDReturnEFT" )
DDProdSales = Request.Form("DDProdSales" )
DDBonusBucks = Request.Form("DDBonusBucks ")
DDPrepaidDlrs = Request.Form("DDPrepaidDlr s")
DDMysticMem = Request.Form("DDMysticMem" )
DDBuyMem = Request.Form("DDBuyMem")
DDMysticSales = Request.Form("DDMysticSale s")
DDMysticSess = Request.Form("DDMysticSess ")
DDNewClients = Request.Form("DDNewClients ")
DDTotSess = Request.Form("DDTotSess")
SBCFreeze = Request.Form("SBCFreeze")
SBCCanRegular = Request.Form("SBCCanRegula r")
SBCCanFreeze = Request.Form("SBCCanFreeze ")
SBCCanMystTran = Request.Form("SBCCanMystTr an")
SBCCanEft = Request.Form("SBCCanEft")
SBCCanTransfer = Request.Form("SBCCanTransf er")
DaysMonth = Request.Form("DaysMonth")
DaysRemain = Request.Form("DaysRemain")
NumOfMem = Request.Form("NumOfMem")
ClosePercent = Request.Form("ClosePercent ")
DSTotSales = FormatNumber(DSTotSales)
PPA = Request.Form("PPA")
PPA = FormatNumber(PPA)
EFT2 = Request.Form("EFT2")
EFT2 = FormatNumber(EFT2)
TotWEft = Request.Form("TotWEft")
TotWEFT = FormatNumber(TotWEft)
TotWOEft = Request.Form("TotWOEft")
TotWOEft = FormatNumber(TotWOEft)
StorePPA = Request.Form("StorePPA")
StorePPA = FormatCurrency(StorePPA)
StoreLPPA = Request.Form("StoreLPPA")
StoreLPPA = FormatCurrency(StoreLPPA)
PerDayHitGoal = Request.Form("PerDayHitGoa l")
PerDayHitGoal = FormatNumber(PerDayHitGoal )
GoalPace = Request.Form("GoalPace")
GoalPace = FormatNumber(GoalPace,2) * 100
NunOfMem = Request.Form("NumOfMem")
NumOfMem = FormatNumber(NumOfMem)
ClosePercent = Request.Form("ClosePercent ")
ClosePercent = FormatNumber(ClosePercent, 2) * 100
strSQL = "INSERT INTO NightlyNumbers1(RepDate,St oreName,Go al,DSTotSa les,DSSess ions,PPA,E FT,TotWEft ,TotWOEft, DDNewClien ts,DDTotSe ss,StorePP A,DDProdSa les,StoreL PPA,DDMyst icSess,DDM ysticSales ,PerDayHit Goal,GoalP ace,NumOfM em,ClosePe rcent,DDTo tSales,DDD raftDep,DD SalesTax,D DPaymentAc ct,DDInHou se,DDGiftC erts,DDRet urnEFT,DDB onusBucks, DDPrepaidD lrs,DDMyst icMem,DDBu yMem,SBCFr eeze,SBCCa nRegular,S BCCanFreez e,SBCCanMy stTran,SBC CanEft,SBC CanTransfe r,DaysMont h,DaysRema in,EFT2) " & _
"VALUES('" & RepDate & "','" & StoreName & "',CONVERT(money,'" & Goal & "'),CONVERT(money,'" & DSTotSales & "'),'" & DSSessions & "',CONVERT(money,'" & PPA & "'),CONVERT(money,'" & EFT & "'),CONVERT(money,'" & TotWEft & "'),CONVERT(money,'" & TotWOEft & "'),'" & DDNewClients & "','" & DDTotSess & "',CONVERT(money,'" & StorePPA & "'),CONVERT(money,'" & DDProdSales & "'),CONVERT(money,'" & StoreLPPA & "'),'" & _
DDMysticSess & "',CONVERT(money,'" & DDMysticSales & "'),CONVERT(money,'" & PerDayHitGoal & "'),'" & GoalPace & "','" & NumOfMem & "','" & ClosePercent & "',CONVERT(money,'" & DDTotSales & "'),CONVERT(money,'" & DDDraftDep & "'),CONVERT(money,'" & DDSalesTax & "'),CONVERT(money,'" & DDPaymentAcct & "'),CONVERT(money,'" & DDInHouse & "'),CONVERT(money,'" & DDGiftCerts & "'),CONVERT(money,'" & DDReturnEFT & "'),CONVERT(money,'" & DDBonusBucks & "'),CONVERT(money,'" & DDPrepaidDlrs & "'),'" & _
DDMysticMem & "','" & DDBuyMem & "','" & SBCFreeze & "','" & SBCCanRegular & "','" & SBCCanFreeze & "','" & SBCCanMystTran & "','" & SBCCanEFT & "','" & SBCCanTransfer & "','" & DaysMonth & "','" & DaysRemain & "',CONVERT(money,'" & EFT2 & "'));"
Set conDB = Server.CreateObject("ADODB .Connectio n")
conDB.Open "Provider=sqloledb;" & _
"Data Source=database-server;" & _
"Initial Catalog=CorpWeb;" & _
"User Id=empnum;" & _
"Password=*****"
'On Error Resume Next
Set strAdd = ConDB.Execute(strSQL)
%>
<html>
<head>
<title></title>
<style>
a { text-decoration: none }
a { text-decoration: none }
</style>
<script language="JavaScript1.2">
window.onload = window.resizeTo(1024,768);
</script>
</head>
<body background="../../images/M etalNew1.j pg" style="background-attachme nt: fixed">
<H3><font face="Tahoma">Nightly Numbers Added</font></H3>
<P><font face="Tahoma">The following store's Nightly Numbers were added to the database for the date of  <% =RepDate %> :</font></P>
<TABLE>
<TR>
<TH ALIGN=RIGHT><font face="Tahoma">Store:</font ></TH>
<TD ALIGN=LEFT><font face="Tahoma"><% =StoreName %></font></TD>
</TR>
</TABLE>
<p><font face="Tahoma"><a href="NightlyStoreNumbers. asp" target="_self" style>Return</a></font></p >
I got it working - not sure exactly what the effects will be down the road, but it writes to the DB now and the reports look good.
added: DSTotSales = FormatNumber(DSTotSales)
changed: PPA = Request.Form("PPA")
PPA = FormatNumber(PPA)
New Code:
NightlyStoreNumbers3.asp
<%
Dim RepDate,StoreName,Goal,EFT
Dim DDPrepaidDlrs,DDMysticMem,
Dim SBCCanTransfer,DaysMonth,D
Dim PPA,EFT2,TotWEft,TotWOEft,
Dim calPPA,calTotWEft,calTotWO
Dim ConDB, rsNumbers, strSQL, strAdd
RepDate = Request.Form("RepDate")
StoreName = Request.Form("StoreName")
Goal = Request.Form("Goal")
EFT = Request.Form("EFT")
DSTotSales = Request.Form("DSTotSales")
DSSessions = Request.Form("DSSessions")
DDTotSales = Request.Form("DDTotSales")
DDDraftDep = Request.Form("DDDraftDep")
DDSalesTax = Request.Form("DDSalesTax")
DDPaymentAcct = Request.Form("DDPaymentAcc
DDInHouse = Request.Form("DDInHouse")
DDGiftCerts = Request.Form("DDGiftCerts"
DDReturnEFT = Request.Form("DDReturnEFT"
DDProdSales = Request.Form("DDProdSales"
DDBonusBucks = Request.Form("DDBonusBucks
DDPrepaidDlrs = Request.Form("DDPrepaidDlr
DDMysticMem = Request.Form("DDMysticMem"
DDBuyMem = Request.Form("DDBuyMem")
DDMysticSales = Request.Form("DDMysticSale
DDMysticSess = Request.Form("DDMysticSess
DDNewClients = Request.Form("DDNewClients
DDTotSess = Request.Form("DDTotSess")
SBCFreeze = Request.Form("SBCFreeze")
SBCCanRegular = Request.Form("SBCCanRegula
SBCCanFreeze = Request.Form("SBCCanFreeze
SBCCanMystTran = Request.Form("SBCCanMystTr
SBCCanEft = Request.Form("SBCCanEft")
SBCCanTransfer = Request.Form("SBCCanTransf
DaysMonth = Request.Form("DaysMonth")
DaysRemain = Request.Form("DaysRemain")
NumOfMem = Request.Form("NumOfMem")
ClosePercent = Request.Form("ClosePercent
DSTotSales = FormatNumber(DSTotSales)
PPA = Request.Form("PPA")
PPA = FormatNumber(PPA)
EFT2 = Request.Form("EFT2")
EFT2 = FormatNumber(EFT2)
TotWEft = Request.Form("TotWEft")
TotWEFT = FormatNumber(TotWEft)
TotWOEft = Request.Form("TotWOEft")
TotWOEft = FormatNumber(TotWOEft)
StorePPA = Request.Form("StorePPA")
StorePPA = FormatCurrency(StorePPA)
StoreLPPA = Request.Form("StoreLPPA")
StoreLPPA = FormatCurrency(StoreLPPA)
PerDayHitGoal = Request.Form("PerDayHitGoa
PerDayHitGoal = FormatNumber(PerDayHitGoal
GoalPace = Request.Form("GoalPace")
GoalPace = FormatNumber(GoalPace,2) * 100
NunOfMem = Request.Form("NumOfMem")
NumOfMem = FormatNumber(NumOfMem)
ClosePercent = Request.Form("ClosePercent
ClosePercent = FormatNumber(ClosePercent,
strSQL = "INSERT INTO NightlyNumbers1(RepDate,St
"VALUES('" & RepDate & "','" & StoreName & "',CONVERT(money,'" & Goal & "'),CONVERT(money,'" & DSTotSales & "'),'" & DSSessions & "',CONVERT(money,'" & PPA & "'),CONVERT(money,'" & EFT & "'),CONVERT(money,'" & TotWEft & "'),CONVERT(money,'" & TotWOEft & "'),'" & DDNewClients & "','" & DDTotSess & "',CONVERT(money,'" & StorePPA & "'),CONVERT(money,'" & DDProdSales & "'),CONVERT(money,'" & StoreLPPA & "'),'" & _
DDMysticSess & "',CONVERT(money,'" & DDMysticSales & "'),CONVERT(money,'" & PerDayHitGoal & "'),'" & GoalPace & "','" & NumOfMem & "','" & ClosePercent & "',CONVERT(money,'" & DDTotSales & "'),CONVERT(money,'" & DDDraftDep & "'),CONVERT(money,'" & DDSalesTax & "'),CONVERT(money,'" & DDPaymentAcct & "'),CONVERT(money,'" & DDInHouse & "'),CONVERT(money,'" & DDGiftCerts & "'),CONVERT(money,'" & DDReturnEFT & "'),CONVERT(money,'" & DDBonusBucks & "'),CONVERT(money,'" & DDPrepaidDlrs & "'),'" & _
DDMysticMem & "','" & DDBuyMem & "','" & SBCFreeze & "','" & SBCCanRegular & "','" & SBCCanFreeze & "','" & SBCCanMystTran & "','" & SBCCanEFT & "','" & SBCCanTransfer & "','" & DaysMonth & "','" & DaysRemain & "',CONVERT(money,'" & EFT2 & "'));"
Set conDB = Server.CreateObject("ADODB
conDB.Open "Provider=sqloledb;" & _
"Data Source=database-server;" & _
"Initial Catalog=CorpWeb;" & _
"User Id=empnum;" & _
"Password=*****"
'On Error Resume Next
Set strAdd = ConDB.Execute(strSQL)
%>
<html>
<head>
<title></title>
<style>
a { text-decoration: none }
a { text-decoration: none }
</style>
<script language="JavaScript1.2">
window.onload = window.resizeTo(1024,768);
</script>
</head>
<body background="../../images/M
<H3><font face="Tahoma">Nightly Numbers Added</font></H3>
<P><font face="Tahoma">The following store's Nightly Numbers were added to the database for the date of  <% =RepDate %> :</font></P>
<TABLE>
<TR>
<TH ALIGN=RIGHT><font face="Tahoma">Store:</font
<TD ALIGN=LEFT><font face="Tahoma"><% =StoreName %></font></TD>
</TR>
</TABLE>
<p><font face="Tahoma"><a href="NightlyStoreNumbers.
Great...
Cheers
Cheers