Error insertion of array type fields
------------------------------------

                 Key: DNET-313
                 URL: http://tracker.firebirdsql.org/browse/DNET-313
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 2.5.2, 2.5.1, 2.5.0, 2.1.0
         Environment: windows and GNU/Linux amd64
            Reporter: luis olascoaga
            Assignee: Jiri Cincura


I have the following table:

CREATE TABLE TABMAT (
    ID      INTEGER NOT NULL,
    MATRIX  INTEGER [1:3,1:4]
);

The test method is to insert a record:

public void Insert(){
  string sql = "INSERT INTO TabMat (Id,Matrix) Values(@ValId,@ValMat)";
  int[,] Mat = { {1,2,3,4}, {10,20,30,40}, {101,102,103,104} };
  Random R = new Random();
  FbTransaction trs = Con.BeginTransaction();
  FbCommand cmd = new FbCommand(sql,Con,trs);
  cmd.Parameters.Add("@ValId",FbDbType.Integer).Value = R.Next();
  cmd.Parameters.Add("@ValMat",FbDbType.Array).Value = Mat;
  cmd.ExecuteNonQuery();
  trs.Commit();
  cmd.Dispose();
  Console.WriteLine("Executed");
 }

In implementing the method generates the following exception:

FirebirdSql.Data.FirebirdClient.FbException subscript out of bounds 

ExecuteNonQuery();

Note: without using a FbTransaction stays the execution in an infinite loop.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to