dotConnect for PostgreSQL and stored procedures support

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
mitakd01
Posts: 3
Joined: Thu 21 May 2020 06:25

dotConnect for PostgreSQL and stored procedures support

Post by mitakd01 » Thu 21 May 2020 14:25

Hello,
Does dotConnect for PostgreSQL support stored procedures?
I have successful calls to functions but when I try a call to procedure it fails with:
2020-05-20 15:48:41,297 [48] ERROR - Devart.Data.PostgreSql.PgSqlException (0x80004005): pkg_image_note$insert_vp9noti2(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) is a procedure
at Devart.Data.PostgreSql.aa.a(Boolean A_0, Boolean A_1, Char A_2, Boolean A_3)
at Devart.Data.PostgreSql.t.f(r A_0)
at Devart.Data.PostgreSql.r.n()
at Devart.Data.PostgreSql.PgSqlCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteNonQuery()


Our current version of dotConnect for PostgreSQL is Version=7.13.1366.0

Thanks,
Dimitar Draginov

mitakd01
Posts: 3
Joined: Thu 21 May 2020 06:25

Re: dotConnect for PostgreSQL and stored procedures support

Post by mitakd01 » Thu 21 May 2020 14:49

I found same issue reported in "dotConnectPostgreSQL using procedure" viewtopic.php?f=3&t=38668.

And its fix reported in "New build of dotConnect for PostgreSQL 7.13.1402 is available!"viewtopic.php?f=3&t=38882
...
LinqConnect (formerly known as LINQ to PostgreSQL)
The bug with running stored procedure in PostgreSQL Server 11 or higher is fixed
...

Does this apply to "dotConnect for PostgreSQL Express" too?
Last edited by mitakd01 on Thu 21 May 2020 16:43, edited 1 time in total.

mitakd01
Posts: 3
Joined: Thu 21 May 2020 06:25

Re: dotConnect for PostgreSQL and stored procedures support

Post by mitakd01 » Thu 21 May 2020 16:16

One more test have been run on another machine with much later version 7.17.1583.0
<add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql"
description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.17.1583.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />


Same error has been hit:
Devart.Data.PostgreSql.PgSqlException (0x80004005): pkg_image_note$insert_vp9noti2(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) is a procedure

Is it possible the bug, once fixed with dotConnect for PostgreSQL 7.13.1402, to be re-introduced in later versions?

Shalex
Site Admin
Posts: 8861
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for PostgreSQL and stored procedures support

Post by Shalex » Sat 23 May 2020 17:48

You should set PgSqlCommand.CommandType = CommandType.StoredProcedure. Refer to https://www.devart.com/dotconnect/postg ... dType.html.

If this doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing.

Post Reply