To completely understand my problem I will give some more background
information.
I have developed an industrial application (C#, .Net 4.0) that uses the
embedded firebird database.
To simplify the interface to firebird I use the BLToolkit3.1 (a wrapper on
ADO.NET)
I do not use any query but only use stored procedures.
The BLToolkit is generating the code to call the stored procedures on runtime.
So now and then (twice a year) the application is raising the exception:
exception FirebirdSql.Data.FirebirdClient.FbException: validation error for
column *** unknown ***, value *** null ***
I can see this in the logfiles of my application.
Here is the complete exception message:
BLToolkit.Data.DataException: validation error for column *** unknown ***,
value "*** null ***"
At procedure 'FEEDINGS_UPDATE' line: 14, col: 3 --->
FirebirdSql.Data.FirebirdClient.FbException: validation error for column ***
unknown ***, value "*** null ***"
At procedure 'FEEDINGS_UPDATE' line: 14, col: 3 --->
FirebirdSql.Data.Common.IscException: Exception of type
'FirebirdSql.Data.Common.IscException' was thrown.
at FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector(IntPtr[]
statusVector)
at FirebirdSql.Data.Client.Native.FesStatement.Execute()
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior
behavior, Boolean returnsSet)
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
--- End of inner exception stack trace ---
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
at BLToolkit.Data.DbManager.ExecuteOperation[T](OperationType operationType,
Func`1 operation) in
C:\Projects\Computronic\SVN\Prowork\Components\bltoolkit.3.1\Source\Data\DbManager.cs:line
4009
--- End of inner exception stack trace ---
at BLToolkit.Data.DbManager.OnOperationException(OperationType op,
DataException ex) in
C:\Projects\Computronic\SVN\Prowork\Components\bltoolkit.3.1\Source\Data\DbManager.cs:line
521
at BLToolkit.Data.DbManager.HandleOperationException(OperationType op,
Exception ex) in
C:\Projects\Computronic\SVN\Prowork\Components\bltoolkit.3.1\Source\Data\DbManager.cs:line
4031
at BLToolkit.Data.DbManager.ExecuteOperation[T](OperationType operationType,
Func`1 operation) in
C:\Projects\Computronic\SVN\Prowork\Components\bltoolkit.3.1\Source\Data\DbManager.cs:line
4017
at BLToolkit.Data.DbManager.ExecuteNonQueryInternal() in
C:\Projects\Computronic\SVN\Prowork\Components\bltoolkit.3.1\Source\Data\DbManager.cs:line
546
at BLToolkit.Data.DbManager.ExecuteNonQuery() in
C:\Projects\Computronic\SVN\Prowork\Components\bltoolkit.3.1\Source\Data\DbManager.cs:line
2370
at Fds.Dal.DataAccess.BLToolkitExtension.FeedingAccessor.Update(Feeding obj)
at Fds.Dal.DataAccess.ManagerBase`2.Update(T obj) in
D:\svn\FeedingSystem\trunk\Src\Fds.Dal\DataAccess\ManagerBaseT.cs:line 73
at Fds.Dal.DataAccess.ManagerBase`2.Save(T obj) in
D:\svn\FeedingSystem\trunk\Src\Fds.Dal\DataAccess\ManagerBaseT.cs:line 92
at Fds.Presenter.ModelPresenter.SetFeedingDto(FeedingDto valueDto) in
D:\svn\FeedingSystem\trunk\Src\Fds.Presenter\ModelPresenter.Feeding.cs:line 600
at SyncInvokeSetFeedingDto(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance,
Object[] inputs, Object[]& outputs)
at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&
rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&
rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)
This is the only information I have.
The exception message does not give me any information about the used input
parameters.
I'm not able to reproduce this error.
The stored procedure 'FEEDINGS_UPDATE' is called for millions of times by the
application without any problem!
The exceptions says: "At procedure 'FEEDINGS_UPDATE' line: 14, col: 3 --->
FirebirdSql.Data.FirebirdClient.FbException: validation error for column ***
unknown ***, value "*** null ***"
What does "line: 14, col: 3 " means?
Is this line 14 of the source code generated by the BLToolkit or line 14 of the
stored procedure on the firebird database?
When I look in IBExpert on the "edit" window to the stored procedure at line 14
I see the END instruction of the stored procedure!
Edit window:
begin
update feedings
set idcurve = :idcurve,
curvedate = :curvedate,
basecorrection = :basecorrection,
correction = :correction,
prevcorrection = :prevcorrection,
correctiondays = :correctiondays,
fillupcharge = :fillupcharge,
feedmethod = :feedmethod,
consumptioncalculated = :consumptioncalculated,
consumptionbyday = :consumptionbyday
where (idfeeding = :idfeeding);
end
Or have I to look to the "DDL" Window?
Then I see on line 14: CONSUMPTIONBYDAY type of column
FEEDINGS.CONSUMPTIONBYDAY)
DDL window:
SET TERM ^ ;
create or alter procedure FEEDINGS_UPDATE (
IDFEEDING type of column FEEDINGS.IDFEEDING not null,
IDCURVE type of column FEEDINGS.IDCURVE,
CURVEDATE type of column FEEDINGS.CURVEDATE,
BASECORRECTION type of column FEEDINGS.BASECORRECTION,
CORRECTION type of column FEEDINGS.CORRECTION,
PREVCORRECTION type of column FEEDINGS.PREVCORRECTION,
CORRECTIONDAYS type of column FEEDINGS.CORRECTIONDAYS,
FILLUPCHARGE type of column FEEDINGS.FILLUPCHARGE,
FEEDMETHOD type of column FEEDINGS.FEEDMETHOD not null,
CONSUMPTIONCALCULATED type of column FEEDINGS.CONSUMPTIONCALCULATED,
CONSUMPTIONBYDAY type of column FEEDINGS.CONSUMPTIONBYDAY)
as
begin
update feedings
set idcurve = :idcurve,
curvedate = :curvedate,
basecorrection = :basecorrection,
correction = :correction,
prevcorrection = :prevcorrection,
correctiondays = :correctiondays,
fillupcharge = :fillupcharge,
feedmethod = :feedmethod,
consumptioncalculated = :consumptioncalculated,
consumptionbyday = :consumptionbyday
where (idfeeding = :idfeeding);
end^
SET TERM ; ^
/* Following GRANT statetements are generated automatically */
GRANT SELECT,UPDATE ON FEEDINGS TO PROCEDURE FEEDINGS_UPDATE;
/* Existing privileges on this procedure */
GRANT EXECUTE ON PROCEDURE FEEDINGS_UPDATE TO SYSDBA;
I do not understand why the column is "Unknown" in the exception message.
The column is specified in the stored procedure itself and therefore it can't
be "Unknown" in my opinion???
And last but not least!!!
When this exception occurs not any stored procedure seems to work anymore.
They all give the same exception: FirebirdSql.Data.FirebirdClient.FbException:
validation error for column *** unknown ***, value *** null ***
The only way to recover from this behavior is to compete restart the
application.
It's a lot of information but I hope somebody have something for me
thanks in advance
Niels
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider