I've been struggling with one problem these past few hours.
I keep getting an error and it tells me that the specified cast is not valid. I'm able to change the values on the database using the stored procedure. However, when I try doing it with the executable I get that error.
This is the error
System.InvalidCastException: Specified cast is not valid.
at Administrator_Panel.DB.ReadAccountInfo(String UserID, In32& Count)
This is the code.
public static Account ReadAccountInfo(string UserID, out int Count)
if (Reader.Read())
ReturnValue = new Account((int)Reader["UserUID"],
(string)Reader["Pw"],
(bool)Reader["Admin"],
(bool)Reader["Staff"],
(short)Reader["Status"],
(int)Reader["Point"],
(int)Reader["DaemonPoints"]);
Any help would be appreciated. :) Thank you