[Help]Get Status Problem

11/09/2008 19:54 martoon#1
After while i keep getting this error, and that error don't let me use commands anymore, Do anyone know how to fix it?

This where the error take me

DataBase.cs
Quote:
public static uint GetStatus(string Acc)
{
MySqlDataAdapter DataAdapter = null;
DataSet DSet = new DataSet();
uint Return = 0;

DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + Acc + "'", Connection);
DataAdapter.Fill(DSet, "Status");

if (DSet.Tables["Status"].Rows.Count > 0)
{
DataRow DR = DSet.Tables["Status"].Rows[0];
Return = (uint)DR["Status"];
}
return Return;
}
Client.cs
Quote:
Status = DataBase.GetStatus(Account);
Please check this.
11/09/2008 20:38 tao4229#2
was going to, but you bump after like 40 minutes?
Go away.
11/09/2008 21:25 Incariuz#3
Personally, don't know why you're even getting an error. My coding is the exact same, I can run it for hours, and nothing goes wrong for me.
11/09/2008 22:57 alexbigfoot#4
Quote:
Originally Posted by martoon View Post
MySqlDataAdapter DataAdapter = null;
use:

MySqlDataAdapter DataAdapter = new MySqlDataAdapter();

it should work, because i bet u get the "Null Exception" error
11/09/2008 23:10 tanelipe#5
What's the error you're getting?
11/10/2008 17:34 martoon#6
Quote:
Originally Posted by alexbigfoot View Post
use:

MySqlDataAdapter DataAdapter = new MySqlDataAdapter();

it should work, because i bet u get the "Null Exception" error
I'am trying right now, i will wait if it works i will tell you.
11/11/2008 16:29 martoon#7
Here the error i get
i hope that anyone can help me fix it and fast
[Only registered and activated users can see links. Click Here To Register...]
11/11/2008 20:14 kinshi88#8
Some values are "Null" in Lines 9451 and 8700.