[FB-Tracker] Created: (DNET-723) Wrong generate SQL statement for the stored procedure

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[FB-Tracker] Created: (DNET-723) Wrong generate SQL statement for the stored procedure

JIRA tracker@firebirdsql.org
Wrong generate SQL statement for the stored procedure
-----------------------------------------------------

                 Key: DNET-723
                 URL: http://tracker.firebirdsql.org/browse/DNET-723
             Project: .NET Data provider
          Issue Type: Bug
          Components: Entity Framework support
    Affects Versions: 5.6.0.0
         Environment: Firebird 2.5.2, Firebird Entity Framework Provider - version 5.6.0, Firebird ADO.NET Data Povider - version 5.6.0, Entity Framework - version 6.1.3
            Reporter: Denis Maslov
            Assignee: Jiri Cincura


Good day!

When I try execute simple procedure over EF, i got the next error: "FirebirdSql.Data.FirebirdClient.FbException: Dynamic SQL Error SQL error code = -204 Implementation limit exceeded ..."
In the end, I found that the problem in the wrong EF generation sql statement.

Text procedure (Firebrd):
procedure B_IMP_I_REESTR (
    IDUSER integer,
    IMPMODE integer,
    IDGEN integer,
    IDPARENT integer,
    IDTCH integer,
    NOMER varchar(15),
    SBORNIK integer,
    NAME varchar(250),
    VIX_DAN blob sub_type 0 segment size 80,
    ISSYSTEM integer,
    POKAZ varchar(8),
    GOD integer,
    RABMAT integer,
    IDGROUP integer,
    IDPODGROUP integer,
    IDTYPE integer,
    ORDERVIEW integer,
    CREATEDATE date,
    AUTHOR varchar(250),
    NORM_GUID varchar(100),
    INSTALL_GUID varchar(100),
    INDEX_YEAR integer,
    INDEX_MONTH integer,
    INDEX_ORGNAME varchar(250),
    INDTYPE varchar(50))
returns (
    ID integer)
...

Text procedure (EF generate):
SELECT
1 AS "C1",
"A"."ID" AS "ID"
FROM "B_IMP_I_REESTR"(CAST(@IDUSER AS INT), CAST(@IMPMODE AS INT), CAST(@IDGEN AS INT), CAST(@IDPARENT AS INT), CAST(@IDTCH AS INT), CAST(@NOMER AS VARCHAR(8191)), CAST(@SBORNIK AS INT), CAST(@NAME AS VARCHAR(8191)), CAST(@VIX_DAN AS BLOB SUB_TYPE BINARY), CAST(@ISSYSTEM AS INT), CAST(@POKAZ AS VARCHAR(8191)), CAST(@GOD AS INT), CAST(@RABMAT AS INT), CAST(@IDGROUP AS INT), CAST(@IDPODGROUP AS INT), CAST(@IDTYPE AS INT), CAST(@ORDERVIEW AS INT), CAST(@CREATEDATE AS TIMESTAMP), CAST(@AUTHOR AS VARCHAR(8191)), CAST(@NORM_GUID AS VARCHAR(8191)), CAST(@INSTALL_GUID AS VARCHAR(8191)), CAST(@INDEX_YEAR AS INT), CAST(@INDEX_MONTH AS INT), CAST(@INDEX_ORGNAME AS VARCHAR(8191)), CAST(@INDTYPE AS VARCHAR(8191))) AS "A"


For example, why INDTYPE varchar(50) -> CAST(@INDTYPE AS VARCHAR(8191)) ???


Regards, Maslov Denis.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider