>         ;
>Message-ID: <[EMAIL PROTECTED]>
>Received: from [200.55.139.21] by web32102.mail.mud.yahoo.com via HTTP;
>         Tue, 20 Jun 2006 11:39:58 PDT
>Date: Tue, 20 Jun 2006 11:39:58 -0700 (PDT)
>From: Reinaldo "Díaz" Castro <[EMAIL PROTECTED]>
>Subject: Provider .NET error! any suggestion?
>To: firebird-net-provider@lists.sourceforge.net
>
>Hi:
>
>I'm using .NET provider for Framework 2.0 in a 
>ASP.NET web application but it give me the following error:
>
>
>Index was out of range. Must be non-negative and 
>less than the size of the collection.
>Parameter name: index
>
>Description: An unhandled exception occurred 
>during the execution of the current web request. 
>Please review the stack trace for more 
>information about the error and where it originated in the code.
>
>Exception Details: 
>System.ArgumentOutOfRangeException: Index was 
>out of range. Must be non-negative and less than the size of the collection.
>Parameter name: index
>
>Source Error:
>
>
>Line 36:         DataSet dts = new 
>DataSet();  Line 37:   Line 38:         fbda.Fill(dts);
>  Line 39:         GridView1.Visible = 
> true;  Line 40:         GridView1.DataSource = dts.Tables[0].DefaultView;
>
>
>
>The code is here:
>
>using System;
>using System.Data;
>using System.Configuration;
>using System.Web;
>using System.Web.Security;
>using System.Web.UI;
>using System.Web.UI.WebControls;
>using System.Web.UI.WebControls.WebParts;
>using System.Web.UI.HtmlControls;
>using FirebirdSql.Data.FirebirdClient;
>public partial class _Default : System.Web.UI.Page
>{
>protected void DoBinding()
>{
>FbConnectionStringBuilder fbcnnbuilder = new FbConnectionStringBuilder();
>fbcnnbuilder.ServerType = FbServerType.Context;
>fbcnnbuilder.UserID = "SYSDBA";
>fbcnnbuilder.Password = "masterkey";
>fbcnnbuilder.Dialect = 3;
>fbcnnbuilder.Database = @"D:\Firebird\1.5.3\examples\EMPLOYEE.FDB";
>fbcnnbuilder.DataSource = "localhost";
>FbConnection fbcnn = new 
>FbConnection(fbcnnbuilder.ToString()); 
>//"ServerType=0;User=SYSDBA;Password=masterkey;Dialect=3;Database=D:\\Firebird\\1.5.3\\examples\\EMPLOYEE.FDB");
>string strcmd = "SELECT EMP_NO, FIRST_NAME, 
>LAST_NAME, PHONE_EXT, HIRE_DATE FROM EMPLOYEE";
>FbDataAdapter fbda = new FbDataAdapter(strcmd, fbcnn);
>DataSet dts = new DataSet();
>fbda.Fill(dts);
>GridView1.Visible = true;
>GridView1.DataSource = dts.Tables[0].DefaultView;
>GridView1.DataBind();
>}
>protected void Button1_Click(object sender, EventArgs e)
>{
>DoBinding();
>}
>}
>
>Thanks in advanced!!
>
>


_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to