Menu

#2 Specified cast is not valid

v1.0_(example)
open
nobody
None
5
2006-03-17
2006-03-17
agnes21
No

I got a error in Line 480:
int m = (int)db.GetScalar("SELECT COUNT(*) FROM " +
InstancePrefix + "ActiveUsers");

I have mysql5.0,NetFramework 2.0, IIS5.0 and the
setup runs fine.

Server Error in '/Chim2' Application.
Specified cast is not valid.
Description: An unhandled exception occurred during
the execution of the current web request. Please
review the stack trace for more information about the
error and where it originated in the code.

Exception Details: System.InvalidCastException:
Specified cast is not valid.

Source Error:

Line 478: }
Line 479: db.DoData("DELETE FROM " +
InstancePrefix + "ActiveUsers WHERE LastUpdate <= '"
+ Chronoset.ConvertToStr(DateTime.Now.AddMinutes(-
UserTimeout)) + "'");
Line 480: int m = (int)db.GetScalar("SELECT
COUNT(*) FROM " + InstancePrefix + "ActiveUsers");
Line 481: if(TrackHighestOnline == 1)
Line 482: if(m > (int)db.GetScalar
("SELECT MaxOnline FROM " + InstancePrefix
+ "Totals"))

Source File: c:\inetpub\wwwroot\Chim2
\Cforum\config.aspx Line: 480

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
ASP.default_aspx.TrackUsers() in
c:\inetpub\wwwroot\Chim2\Cforum\config.aspx:480
ASP.default_aspx.Top(String title) in
c:\inetpub\wwwroot\Chim2\Cforum\config.aspx:119
ASP.default_aspx.Local_Load() in
c:\inetpub\wwwroot\Chim2\Cforum\Default.aspx:10
ASP.default_aspx.Page_Load() in
c:\inetpub\wwwroot\Chim2\common\vars.aspx:155

System.Web.Util.ArglessEventHandlerDelegateProxy.Callb
ack(Object sender, EventArgs e) +10
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +720

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.