Desperate Help Needed!!!!!!!!!!!
I have retrieved stored values from the database, but how can i
convert them to be used for a calculation and how can i apply
the select statement to get the correct BasicPay calculation.....
Please help....Desperately...Chryso....Thanxs
<%
Dim BasicPay, Payfreq, PayRate, StdHours
Dim objRS ' recordset object
Set objRS = Server.CreateObject ("ADODB.Recordset" ' create recordset object
objRS.Open "Personal", objConn, _
adOpenForwardOnly, adLockReadOnly, adCmdTable ' now open it
Response.Write " You are paid " & objRS.Fields("Payfreq" & ",<BR> "
Response.Write "Your rate of pay is £" & objRS.Fields("PayRate" & " per hour " & ", <BR>"
Response.Write "You have worked " & objRS.Fields("stdHours" & " hours " & objRS.Fields("Payfreq" & ", <BR>"
objRS.Close ' now close it
Set objRS = Nothing ' ...and clean up
%>
<% Select case Payfreq
case "Weekly"
BasicPay = Payrate * StdHours
case "Monthly"
BasicPay = (PayRate * StdHours)*4
End Select %>
I have retrieved stored values from the database, but how can i
convert them to be used for a calculation and how can i apply
the select statement to get the correct BasicPay calculation.....
Please help....Desperately...Chryso....Thanxs
<%
Dim BasicPay, Payfreq, PayRate, StdHours
Dim objRS ' recordset object
Set objRS = Server.CreateObject ("ADODB.Recordset" ' create recordset object
objRS.Open "Personal", objConn, _
adOpenForwardOnly, adLockReadOnly, adCmdTable ' now open it
Response.Write " You are paid " & objRS.Fields("Payfreq" & ",<BR> "
Response.Write "Your rate of pay is £" & objRS.Fields("PayRate" & " per hour " & ", <BR>"
Response.Write "You have worked " & objRS.Fields("stdHours" & " hours " & objRS.Fields("Payfreq" & ", <BR>"
objRS.Close ' now close it
Set objRS = Nothing ' ...and clean up
%>
<% Select case Payfreq
case "Weekly"
BasicPay = Payrate * StdHours
case "Monthly"
BasicPay = (PayRate * StdHours)*4
End Select %>