[Solved] Object reference, c# [duplicate]
[ad_1] you have to call db_connection() before your are able to use if (connect.State == ConnectionState.Open) otherwise connect is null and has no State property 1 [ad_2] solved Object reference, c# [duplicate]