[Solved] ExecuteReader: Connection property has not been initialized. Browser Game [closed]

[ad_1]

You didn’t connect your SqlConnection and SqlCommand.

Just define your connection as a second parameter like;

SqlCommand CheckExp = new SqlCommand("SELECT Experience FROM Player WHERE UserID=@uid", connection);

Or you can assing your SqlCommand.Connection property like;

CheckExp.Connection = connection;

4

[ad_2]

solved ExecuteReader: Connection property has not been initialized. Browser Game [closed]