Be a Supporter!

Asp.Net Errors

  • 583 Views
  • 4 Replies
New Topic Respond to this Topic
bumcheekcity
bumcheekcity
  • Member since: Jan. 19, 2003
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Asp.Net Errors 2004-11-07 08:36:19 Reply

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:

Line 18:
Line 19: IF NOT oldpass = "" THEN
Line 20: database_connect("SELECT * FROM "+Session("tablename")+"users WHERE user_id = '"+userid+"'")
Line 21: strloginid = objdatareader("login_id")
Line 22: database_disconnect()

What does it mean, not in the correct format? This format works for my other pages, why not this one?

Pilot-Doofy
Pilot-Doofy
  • Member since: Sep. 13, 2003
  • Offline.
Forum Stats
Member
Level 37
Musician
Response to Asp.Net Errors 2004-11-07 10:36:49 Reply

I'm glad I learned php but hey, bumcheekcity what happened to you on Mustywindows? lol

SteveGuzzi
SteveGuzzi
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Supporter
Level 16
Writer
Response to Asp.Net Errors 2004-11-07 17:47:39 Reply

At 11/7/04 08:36 AM, bumcheekcity wrote: Source Error:

Line 18:
Line 19: IF NOT oldpass = "" THEN
Line 20: database_connect("SELECT * FROM "+Session("tablename")+"users WHERE user_id = '"+userid+"'")
Line 21: strloginid = objdatareader("login_id")
Line 22: database_disconnect()

What does it mean, not in the correct format? This format works for my other pages, why not this one?

I've only dealt with classic ASP, but I'm guessing that it's either the fact that you used + instead of & to concatenate your strings, or maybe you were just supposed to put a space at the start of the "users WHERE user_id = " string...but then again it looks like there isn't supposed to be a space there.

I dunno, try just Writing out the SQL string to see if it's even coming out the way you're expecting it to.


BBS Signature
SteveGuzzi
SteveGuzzi
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Supporter
Level 16
Writer
Response to Asp.Net Errors 2004-11-07 17:49:42 Reply

Actually, I think you're just using mis-matched single and double quotes towards the end of the SQL statement.


BBS Signature
Phroek
Phroek
  • Member since: Jun. 8, 2002
  • Offline.
Forum Stats
Member
Level 41
Blank Slate
Response to Asp.Net Errors 2004-11-09 00:55:05 Reply

At 11/7/04 10:36 AM, Pilot-Doofy wrote: I'm glad I learned php

You should challenge yourself a little more and try learning a real programming language some time... You know, don't confine yourself to simple scripting languages...