Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Type mismatch error has suddenly appeared
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  06:12:45  Show Profile
This forum has been running a while with 97 members, just noticed today I'm getting an error

http://www.hexult.com/forum

I've used a number of forums with MSaccess tables for years with no problems, this is my first SQL database and I know little about it.

I've tried opening the tables directly using software called DBmanager and they all seem to open OK

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 April 2006 :  07:51:59  Show Profile  Send ruirib a Yahoo! Message
You are definitely missing some files, make sure you upload all the Snitz files to the forum folder. One I found missing is active.asp, so I'm admiting that you are missing others, what would account for the type mismatch error.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  08:02:47  Show Profile
I've checked through the list, they were all there except the Active.asp (somehow the first one in the list got deleted)
I've added that one now, but still not working
Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  08:06:36  Show Profile
The error occours on two pages for the iPageTotal
and on the default page at:
if Member_Count = 1 and User_Count = 1 then

It seems to be having a problem counting the members

Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  09:49:09  Show Profile
If you go to the page
http://www.hexult.com/forum/members.asp
you get the error

it is in the last line of this section:

strSql1 = "SELECT COUNT(MEMBER_ID) AS PAGECOUNT "
set rsCount = my_Conn.Execute(strSql1 & strSql2 & strSql3)
iPageTotal = rsCount(0).value
rsCount.close
set rsCount = nothing
if iPageTotal > 0 then

So i thought I'd print out the sql and iPageTotal
http://www.hexult.com/forum/memberstest.asp

The sql looks OK
and the iPageTotal gives 93 which is the correct number of members, so the only reason for a mismatch error is if "93" is text and not a number in the line
if iPageTotal > 0 then
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 April 2006 :  09:55:26  Show Profile  Visit AnonJr's Homepage
Did your host do any upgrades? In some odd instances I've seen where that can jack with datatyping... not that that completely solves the problem, but it gives you a place to look for the solution.

Try using cInt() or cLng() to typecast iPageTotal and see if that fixes it.
Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  09:57:04  Show Profile
What is going on?
I've added the line
Response.Write isnumeric(iPageTotal)
and it's telling me it's not a number
(see the test page)
So I have amended a line to this:
iPageTotal = clng(rsCount(0).value)
on the members page and now it is working fine.
Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  09:58:14  Show Profile
Thanks AnonJr, our thoughts crossed
I've now got to figure out what's up with the defailt page
Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 19 April 2006 :  10:06:40  Show Profile
Sorry Default page.

Found three variables

Member_Count
User_Count
ActiveTopicCount

Added a Clng() when populating them, now all is well.

Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 April 2006 :  10:49:13  Show Profile  Visit AnonJr's Homepage
Glad its all working now.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 April 2006 :  14:14:10  Show Profile  Send ruirib a Yahoo! Message
What database are you using? MySQL?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

perrybond
Starting Member

26 Posts

Posted - 09 May 2006 :  06:46:57  Show Profile
Yes I am using MySQL

(sorry didn't see your question)

Just noticed I've a new error today, but cannot get to a PC where I can check the code until this evening
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 09 May 2006 :  09:20:25  Show Profile  Send ruirib a Yahoo! Message
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=55925


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07