This question already has an answer here:

I am getting this error, and it points me to this code:

private int getPlaces(string id)
        string strConnectionString = ConfigurationManager.ConnectionStrings["SilverInfocomm"].ConnectionString;
        SqlConnection myConnect = new SqlConnection(strConnectionString);
        string sql = "SELECT Places FROM SIJ WHERE ID='" + id + "'";
        SqlCommand cmd = new SqlCommand(sql, myConnect);
        int numrows = (int)cmd.ExecuteScalar();
        return numrows;

Please help :-(

Related posts

Recent Viewed