Author |
Topic |
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 06:12:45
|
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
|
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 |
|
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 08:02:47
|
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
|
|
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 08:06:36
|
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
|
|
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 09:49:09
|
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
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 April 2006 : 09:55:26
|
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. |
|
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 09:57:04
|
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. |
|
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 09:58:14
|
Thanks AnonJr, our thoughts crossed I've now got to figure out what's up with the defailt page |
|
|
perrybond
Starting Member
26 Posts |
Posted - 19 April 2006 : 10:06:40
|
Sorry Default page.
Found three variables
Member_Count User_Count ActiveTopicCount
Added a Clng() when populating them, now all is well.
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 April 2006 : 10:49:13
|
Glad its all working now. |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
perrybond
Starting Member
26 Posts |
Posted - 09 May 2006 : 06:46:57
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
|
Topic |
|