Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FckEditor
Message
 
 
To
15/01/2008 14:11:58
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01281605
Message ID:
01281997
Views:
15
>I'm not using it, but I've got to say that the name alone would keep me from even wanting to try it. How the heck would you pronounce that without saying a bad word? <g>
>
>~~Bonnie
>
You're probably right.

In the meantime I'm getting more and more frustrated :( I make a small change, try to debug and get all sorts of strange exceptions that should not have been related with that change at all.

Say, this code (I didn't touch it at all and haven't even traced where it's called and why)


//if(!rdr.HasRows)
// throw new Exception("Reader is empty");
rdr.Read();

this.Name = (string)rdr["Name"];
PhoneNum = rdr["PhoneNum"].ToString();
Email = rdr["Email"].ToString();
UserName = rdr["UserName"].ToString();
Password = rdr["Password"].ToString();
DomainName = rdr["DomainName"].ToString();
SiteID = (int)rdr["SiteID"];

// Close connection
rdr.Close();
sConn.Close();
}
catch(Exception E)
{
throw new Exception("in GetWebAdminsInfo()" + E.Message, E.InnerException);
}
}

gives an exception and if I ignore it it gives
------------------------------------------------------------------------------
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.Exception: in GetWebAdminsInfo()Invalid attempt to read when no data is present.

Source Error:


Line 121: catch(Exception E)
Line 122: {
Line 123: throw new Exception("in GetWebAdminsInfo()" + E.Message, E.InnerException);
Line 124: }
Line 125: }

---------------------------------------
it looks to me that I do have to check if reader returns records first as it seems to be in the commented code.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform