Salve, prima che mi rompo mi dite come mai mi salta fuori questo errore:
ERROR [HYT00] [MySQL][ODBC 3.51 Driver]User DA495_Thor has already more than 'max_user_connections' active connections
con questo codice:
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.Odbc;
public partial class Photo_List : System.Web.UI.Page
{
String connectionString = ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
Popola();
}
private void Popola()
{
OdbcConnection conn = new OdbcConnection(connectionString);
string SQL = "SELECT * FROM photo where _category=?";
conn.Open();
OdbcCommand cmd = new OdbcCommand(SQL, conn);
cmd.Parameters.AddWithValue("?", "" + Request.QueryString["PhotoCat"] + "");
DataSet ds = new DataSet();
OdbcDataAdapter da = new OdbcDataAdapter(cmd);
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
da.Dispose();
ds.Dispose();
cmd.Dispose();
conn.Close();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
Popola();
}
protected void DropDownList1_Init(object sender, EventArgs e)
{
OdbcConnection conn = new OdbcConnection(connectionString);
string SQL = "SELECT * FROM photo_category";
conn.Open();
OdbcCommand cmd = new OdbcCommand(SQL, conn);
OdbcDataReader ddlValues;
ddlValues = cmd.ExecuteReader();
DropDownList1.DataSource = ddlValues;
DropDownList1.DataValueField = "iCatId";
DropDownList1.DataTextField = "cName";
DropDownList1.DataBind();
cmd.Dispose();
conn.Close();
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect("list.aspx?PhotoCat=" + DropDownList1.SelectedItem.Text + "");
}
}
Su aruba funziona tutto tranquillamente è su register che salta fuori quell'errore , ma se io dopo 1 minuto faccio f5 rifuziona la pagina senza dare quell'errore come mai?