Hola Carlos,
this piece of code
FbCommand Cmd = new FbCommand("SP_VERIFICA_CODICE", Conn);
Cmd.CommandType = CommandType.StoredProcedure;
Cmd.Parameters.Add("@IN_COD_MSISDN", FbDbType.VarChar).Value =
edtCodice.Text;
FbDataReader dr = Cmd.ExecuteReader();
dr.Read();
if (!dr.IsDBNull(0))
{
lblValidazioneCodice.Text = "Codice valido e utilizzabile";
}
else
{
lblValidazioneCodice.Text = "Codice o MSISDN inesistente";
}
dr.Close();
causes the following exception
System.ArgumentOutOfRangeException: Index was out of range. Must be
non-negative and less than the size of the collection. Parameter name: index
on dr.Close(); // if removed works ok
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative
and less than the size of the collection.
Parameter name: index]
System.Collections.ArrayList.get_Item(Int32 index) +91
FirebirdSql.Data.Firebird.FbCommand.SetOutputParameters() +81
FirebirdSql.Data.Firebird.FbDataReader.Close() +97
Acros.Edu.EduStart.btnVerificaCodice_Click(Object sender, EventArgs e) in
d:\webroot\Edu\default.aspx.cs:200
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Thank you.
Ciao,
Alessandro Petrelli.
|