Hi All.
Just after creatin' a new Forum or Topic, I get the error : " can't cast null value, function: 'CLng'"
Well I figured that this error arises because the number of Topics in the new forum is 0 and the number of Posts is also zero.
So in the database these values are stored as "Null".
Well my solution was to cahnge the foll line:
From : lngPosts = CLng(rsData("No_of_Posts")) 'somethin like dis
TO:
if IsNumeric(rsData("No_of_Posts")) then
lngPosts = CLng(rsData("No_of_Posts"))
else
lngPosts = 0
endif
... and the same for the number of topics.
Is this a bug or it just happened on my system only?
Maybe these table fields should not be allowed to take "Null" values therefore forcing the script to input a zero when a new Forum is created.
I'm on wwf7.3 , SQL Server 7, IIS5
Edited by NextDoorKid