ASP 3.0 : CDbl Error?

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

I using ASP 3.0 for some calculation and it is prompt error message where
CDbl is not accept 0.00.

How can I solve it?

Please help.


Error Message
=============
Microsoft VBScript runtime error '800a005b'
Object variable not set
process2.asp, line 517


Database Record
===============
Record 1
--------
BasicSalary : 12650
Provision : 759
MonthlyRB : 63.249747
RBBF : 0


Record 2
--------
BasicSalary : 0
Provision : 0
MonthlyRB : 6458.732194
RBBF : 77535.800652


Expected Result
---------------
BasicSalary : 12650 + 0
Provision : 759 + 0
MonthlyRB : 63.249747 + 6458.732194
RBBF : 0 + 77535.800652


ASP 3.0 Coding
--------------
Set rsS = Server.CreateObject("ADODB.Recordset")
rsSstatm = "SELECT * FROM current_director where employeeno = '"
&rsInq("employeeno") & "' ORDER BY DateMonth DESC"
rsS.Open rsSstatm, ConnSQL

rsS.movefirst

do while not rsS.eof

AddEmployeeno = CStr(rsS("employeeno"))
AddYear = CDbl(2005)
AddBasicSalary = CDbl(rsS("basicsalary")) + CDbl(AddBasicSalary) <--------
line 517
AddProvision = CDbl(rsS("provision")) + CDbl(AddProvision)
AddMonthlyRB = CDbl(rsS("monthlyrb")) + CDbl(AddMonthlyRB)
AddRBBF = CDbl(rsS("rbbf")) + CDbl(AddRBBF)

rsS.movenext
loop

rsS.close

Set rsS = nothing
Set rsSstatm = nothing
 
Sam,

I looked at your code, however could not see directly where was the error.

This is not an ASP net newsgroup by the way, probably you are better of in a
real ASP newsgroup (not an ASPNET newsgroup)

microsoft.public.inetserver.general 'the most active one
microsoft.public.inetserver.db ' more in the line of your question

I hope you find your answer?

Cor
 
thanks for advise.

I manage to solved it by declare the object due to .net framework 1.1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top