Insert with Dapper and text for blob with length > 4000

19 views
Skip to first unread message

baur...@gmail.com

unread,
Dec 7, 2024, 11:44:36 AM12/7/24
to firebird-net-provider
Hello,

i am facing a problem when I want to insert a new record with a text, tha exceed the length of 4000.


It looks more lie a Dapper issue to me.

Does anybody else have the same problem and maybe a solution?

The simple way by using a FbCommand and paramters works without problems.

Thanks

Niko

Jiří Činčura

unread,
Dec 7, 2024, 12:36:24 PM12/7/24
to 'Mr. John' via firebird-net-provider
Guessing by the line number, looks like Dapper is setting negative value for Size property of FbParameter, which looks suspicious. Maybe it is setting -1 as an unknown value… Sadly the docs https://learn.microsoft.com/en-us/dotnet/api/system.data.common.dbparameter.size?view=net-8.0#system-data-common-dbparameter-size does not really specify expected values.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/
> --
> You received this message because you are subscribed to the Google
> Groups "firebird-net-provider" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to firebird-net-pro...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/firebird-net-provider/b28701d9-a635-450c-971a-ccbe7cc1f64fn%40googlegroups.com
> <https://groups.google.com/d/msgid/firebird-net-provider/b28701d9-a635-450c-971a-ccbe7cc1f64fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

baur...@gmail.com

unread,
Dec 7, 2024, 12:52:37 PM12/7/24
to firebird-net-provider
Hello Jiri,

could this be related to the fieldtype blob subtype 1 (= text)? If yes, on which side could it be fixed?

Niko

Jiří Činčura

unread,
Dec 7, 2024, 2:36:19 PM12/7/24
to 'Mr. John' via firebird-net-provider

baur...@gmail.com

unread,
Jan 17, 2025, 7:43:59 AMJan 17
to firebird-net-provider
Hello Jiri,

I got response from Dapper (Marc Grawell):  "To many providers, -1 means "max", which accepts most values. In the AOT work, [DbValue(...)] allows Size to be controlled explicitly, or in vanilla Dapper, there is DbString for values, which again allows the Size to be controlled."

Is this something you can work on?

Niko

Jiří Činčura

unread,
Jan 20, 2025, 7:56:42 AMJan 20
to 'Mr. John' via firebird-net-provider
> Is this something you can work on?

Not sure what "this" means.
Reply all
Reply to author
Forward
0 new messages