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

Firebird: Insert with blob.Length > 4000 fails with System.ArgumentOutOfRangeException #2134

Open
bauradar opened this issue Dec 7, 2024 · 0 comments

Comments

@bauradar
Copy link

bauradar commented Dec 7, 2024

Hello,

I am using Dapper with Firebird for some time and its like a charm. Unfortunatly I am facing a problem, when I try to Insert a record with text into a blob, when the length of the text > 4000.

I loaded the lastest version of Dapper and the Firebird .net provider and included the debug symbols.

  • .net 4.8
  • Dapper 2.1.35
  • Firebird .net provider 10.3.1

When I hit this line in my code baustelle.BaustellenID = fbCon.QuerySingle(insertorupdateBaustellen, baustelle); I step into the Daper code.

grafik

grafik

The final exception is this:
at FirebirdSql.Data.FirebirdClient.FbParameter.set_Size(Int32 value) in //src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameter.cs:line 77
at Dapper.CommandDefinition.SetupCommand(IDbConnection cnn, Action2 paramReader) in /_/Dapper/CommandDefinition.cs:line 144 at Dapper.SqlMapper.QueryRowImpl[T](IDbConnection cnn, Row row, CommandDefinition& command, Type effectiveType) in /_/Dapper/SqlMapper.cs:line 1271 at Dapper.SqlMapper.QuerySingle[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable1 commandTimeout, Nullable`1 commandType) in /
/Dapper/SqlMapper.cs:line 878
at fbTest.Program.Main(String[] args) in D:\Software Test\fbTest\Program.cs:line 70

When I use ADO standard method with command and parameters it works without problems.

Check your library version, and try updating
To help, we're going to need to know your library version. If it isn't the latest: go do that - it might
fix the problem, and even if it doesn't: you're going to need to update if we find a problem and fix it,
so you might as well get ready for that now.

How to reproduce: Insert a new record into the database with a text for the blob, where the text has a length > 4000

The actual behavoir: exception as described above
The needed behavior: successfull insert

Thanks

Niko

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

1 participant