Inserting data after update results in "Column unknown" or "Must declare the 
variable '@px' errors
--------------------------------------------------------------------------------------------------

                 Key: DNET-945
                 URL: http://tracker.firebirdsql.org/browse/DNET-945
             Project: .NET Data provider
          Issue Type: Bug
          Components: Entity Framework Core
    Affects Versions: 7.1.1.0
         Environment: Windows 10, 16 GB RAM, i7-8850H CPU, Entity Framework 
Core 2.2.4, Firebird driver 7.1.1, Asp.Net Web Application with target 
framework 4.7.2, .Net Standard library 2.0
            Reporter: Jan Pross
            Assignee: Jiri Cincura
            Priority: Blocker


Error is basically the same as in issue described here 
https://stackoverflow.com/questions/56357771/how-to-fix-must-declare-the-variable-with-firebirdsql-entityframeworkcore-fire

I've created simple web application where you can reproduce the issue 
https://filebin.net/cpfsuoh16xdl28xi
Steps to reproduce:
1. Build and run the web app
2. Repeat the same request e.g. 50 times by using some tool (if the requests 
are generated by refreshing the browser, the issue will not occur)
2. a. Capture the request e.g. with fiddler 
2. b. Repeat the request from fiddler 50 times
3. An error occurs:
3. a. 

Dynamic SQL Error
SQL error code = -206
Column unknown
P0
At line 2, column 9

at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior 
behavior)
   at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior 
behavior, CancellationToken cancellationToken)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
   at 
Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__17.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
   at 
Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.<ExecuteAsync>d__32.MoveNext()

OR

3. b.

Must declare the variable '@p1'

at FirebirdSql.Data.FirebirdClient.FbCommand.UpdateParameterValues()
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior 
behavior, Boolean returnsSet)
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior 
behavior)
   at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior 
behavior, CancellationToken cancellationToken)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
   at 
Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__17.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
   at 
Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.<ExecuteAsync>d__32.MoveNext()


Names of the columns and parameters can be different each time. Some requests 
will pass successfully some will result in beforehand mentioned errors. When an 
error occurs any other following request will result in an error unless the 
whole server is restarted.

We encountered this issue after switching some other parts of our solution to 
firebird. We are using 7.1.1 driver and we can not update to 7.5.0 for now (as 
it depends on EF core >= 3.0).


-- 
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
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to