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

FbException: arithmetic exception, numeric overflow, or string truncation [DNET377] #382

Closed
firebird-automations opened this issue Apr 3, 2011 · 4 comments

Comments

@firebird-automations
Copy link

Submitted by: Richard Brown (flukefan)

Is related to DNET124

Attachments:
DNET-377.zip

Votes: 2

Reusing a command+parameters, with different (length) values, causes exception: FirebirdSql.Data.FirebirdClient.FbException: arithmetic exception, numeric overflow, or string truncation

Example code:

            cmd\.CommandText = @"insert into FbTest \(Id, TestColumn\) values \(@p0, @p1\);";

            IDataParameter p0 = cmd\.CreateParameter\(\);
            p0\.ParameterName = "@p0";
            p0\.DbType = DbType\.Int32;
            p0\.Direction = ParameterDirection\.Input;
            cmd\.Parameters\.Add\(p0\);

            IDataParameter p1 = cmd\.CreateParameter\(\);
            p1\.ParameterName = "@p1";
            p1\.DbType = DbType\.String;
            p1\.Direction = ParameterDirection\.Input;
            cmd\.Parameters\.Add\(p1\);

            p0\.Value = 1;
            p1\.Value = "test1";
            cmd\.ExecuteNonQuery\(\);

            p0\.Value = 2;
            p1\.Value = "test10";
            cmd\.ExecuteNonQuery\(\); // causes exception

Works OK if you revert to 2.5.2 provider.

Commits: 392d18b

@firebird-automations
Copy link
Author

Commented by: Richard Brown (flukefan)

Unzip attached file and run build.bat to reproduce.

@firebird-automations
Copy link
Author

Modified by: Richard Brown (flukefan)

Attachment: DNET377.zip [ 11937 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue is related to DNET124 [ DNET124 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

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

resolution: Fixed [ 1 ]

Fix Version: 2.6.1 [ 10400 ]

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