Take off the spare double quotes:
sqlCommandCheckBalance.CommandText = "SELECT * FROM Accounts WHERE accountID = '" + "accountID" + "'";
Becomes
sqlCommandCheckBalance.CommandText = "SELECT * FROM Accounts WHERE accountID = '" + accountID + "'";
Or (preferably) use a parametrized query instead!
like this? sqlCommandCheckBalance.Parameters["accountID"].Value = balanceShow.Text;
And
on this line of code - readdata = sqlCommandCheckBalance.ExecuteReader();
cannot convert parameter from string to int32... how would i convert it try a few things but nothing working
That is SQL complaining about the value of a parameter you have passed over - presumably the account ID.
Check the type you gave it when you declared it, or try this:
sqlCommandCheckBalance.CommandText = "SELECT * FROM Accounts WHERE accountID = @ID";
sqlCommandCheckBalance.Parameters.AddWithValue("@ID", accountID);
I don't guarantee that will compile, because I don't know type
sqlCommandCheckBalance
is - if it is an SqlCommand object it should be fine.
BTW: You do realise you can specify both the command and connection in the SqlCommand constructor?
SqlCommand sqlCommandCheckBalance = new SqlCommand("SELECT * FROM Accounts WHERE accountID = @ID", con);
sqlCommandCheckBalance.Parameters.AddWithValue("@ID", accountID);
A lot of people think it is a lot tidier way to do it!