Naomi,
>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.I doubt if the Editor has anything to do with why your changes don't work. (I'm curious why you're not just using Visual Studio?)
>it looks to me that I do have to check if reader returns records first as it seems to be in the commented code.I'd say so, but I don't use Readers so I can't say for sure (but, I wonder why it's commented out?)
~~Bonnie
>>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.