Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error insertion of array type fields [DNET313] #324

Closed
firebird-automations opened this issue Apr 25, 2010 · 1 comment
Closed

Error insertion of array type fields [DNET313] #324

firebird-automations opened this issue Apr 25, 2010 · 1 comment

Comments

@firebird-automations
Copy link

Submitted by: luis olascoaga (olasur)

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.

Commits: 7ed6b80

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: vNext [ 10705 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants