sporfex
asked on
Type mismatch: 'cdec'
Hi.
Type mismatch: 'cdec'
Here is the code:
ProductId = 262555561
OpLocationId = 2
InternalTime = trim(Request.Form("InsertI nternalTim e"))
InternalYield = trim(Request.Form("InsertI nternalYie ld"))
CustomerTime = trim(request.Form("InsertC ustomerTim e"))
CustomerYield =trim(Request.Form("Insert CustomerYi eld"))
EditedTime = Now()
if isnumeric(InternalTime) or isnumeric(InternalYield) or isnumeric(CustomerTime) or isnumeric(CustomerYield) then
InternalTime = cdec(InternalTime)
InternalYield = cdec(InternalYield)
CustomerTime = cdec(CustomerTime)
CustomerYield = cdec(CustomerYield)
else
'it isn't numeric
end if
remoteconn.execute "INSERT OpRegister (ProductId, OpLocationId, InternalTime, InternalYield, CustomerTime, CustomerYield, EditedDate) VALUES ('" & ProductId & "','" & OpLocationId & "'," & InternalTime & " ,'" & InternalYield & "','" & CustomerTime & "','" & CustomerYield & "','" & EditedDate & "')"
Why error?
Type mismatch: 'cdec'
Here is the code:
ProductId = 262555561
OpLocationId = 2
InternalTime = trim(Request.Form("InsertI
InternalYield = trim(Request.Form("InsertI
CustomerTime = trim(request.Form("InsertC
CustomerYield =trim(Request.Form("Insert
EditedTime = Now()
if isnumeric(InternalTime) or isnumeric(InternalYield) or isnumeric(CustomerTime) or isnumeric(CustomerYield) then
InternalTime = cdec(InternalTime)
InternalYield = cdec(InternalYield)
CustomerTime = cdec(CustomerTime)
CustomerYield = cdec(CustomerYield)
else
'it isn't numeric
end if
remoteconn.execute "INSERT OpRegister (ProductId, OpLocationId, InternalTime, InternalYield, CustomerTime, CustomerYield, EditedDate) VALUES ('" & ProductId & "','" & OpLocationId & "'," & InternalTime & " ,'" & InternalYield & "','" & CustomerTime & "','" & CustomerYield & "','" & EditedDate & "')"
Why error?
ASKER
But I recive error if is just use (below) also:
if isnumeric(InternalTime) then
InternalTime = clng(InternalTime)
else
'it isn't numeric
end if
Type mismatch: 'cdec'
/operationsregister/insert .inc, line 35
That is this line : InternalTime = clng(InternalTime)
if isnumeric(InternalTime) then
InternalTime = clng(InternalTime)
else
'it isn't numeric
end if
Type mismatch: 'cdec'
/operationsregister/insert
That is this line : InternalTime = clng(InternalTime)
ASKER
Sorry, error is this line (the other was messed up for some reason): InternalTime = cdec(InternalTime)
hi
Cdec is only supported in visual basic not in asp.
Bye
loveneesh
Cdec is only supported in visual basic not in asp.
Bye
loveneesh
ASKER
loveneesh,
What shall I use instead?
What shall I use instead?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This was much. How should I implement that? I'm lost. You know I'm not an educated programmer. I just puzzle things together and get it to work. Sometimes..
i.e. Use cdbl instead of cdec
then
InternalTime = clng(InternalTime)
InternalYield = clng(InternalYield)
CustomerTime = clng(CustomerTime)
CustomerYield = clng(CustomerYield)
else
'it isn't numeric
end if