Batch mode param value is null
-
- Posts: 3
- Joined: Tue 22 Dec 2015 21:47
Batch mode param value is null
We have just upgraded our source code form XE2 to XE10 Seattle and latest version of ODAC. We were using Batch mode in XE2 for inserting records and it all worked fine but after upgrading to latest version we are seeing errors in batch mode where -1 param values are treated as null and Oracle db throws error as the column in the table doesn't allow null values. If I turn off batch mode then everything works as expected and there are no errors.
Re: Batch mode param value is null
We have checked the behavior of ODAC 9.6.21 in RAD Studio Seattle 10 when executing Batch operations. Unfortunately, we couldn't reproduce the described behavior: parameters with value "-1" (e.g., NUMBER, NUMBER(12, 7)) are saved to the database correctly. Please compose a small sample reproducing the issue and send it to us including the script to create database objects used in the sample.
-
- Posts: 3
- Joined: Tue 22 Dec 2015 21:47
Re: Batch mode param value is null
We have this issue in our app and it is very complex and it is going to be a big task to replicate that in a test app.
Is it possible to see the parameter values sent to Oracle server in a batch command using DBMonitor? I have used DBMonitor in past but for some reason I don't see the values passed in the batch command.
Is it possible to see the parameter values sent to Oracle server in a batch command using DBMonitor? I have used DBMonitor in past but for some reason I don't see the values passed in the batch command.
Re: Batch mode param value is null
Unfortunately, the current version of Devart DBMonitor doesn't allow to display value arrays, that are passed in parameters when using Batch operations. We will consider the possibility to implement this functionality in future. You can leave your suggestions at our UserVoice page (http://devart.uservoice.com/forums/1046 ... 909-common), and if there are many votes for your suggestion, we will implement it.
We understand, that the project with the described issue is very complex. Please try to reproduce the issue using a simple test application - in this case, we will be able to investigate it more deeply.
We understand, that the project with the described issue is very complex. Please try to reproduce the issue using a simple test application - in this case, we will be able to investigate it more deeply.
-
- Posts: 3
- Joined: Tue 22 Dec 2015 21:47
Re: Batch mode param value is null
I will try and create a test app but in mean time I am debugging the app.
In function
following line
is now adding 1 but it was not doing so in the previous version of ODAC we used. Could you please explain why this was done?
In function
Code: Select all
function TOraParam.GetTableLength: integer;
begin
// FDataPtr can be array in two cases:
// 1. No DML array, DataType is ftBytes or ftVarBytes: VarType(FDataPtr) = varArray or varByte
// 2. DML array: VarType(FDataPtr) = varArray or varVariant
if VarType(FDataPtr) = varArray or varVariant then
Result := VarArrayHighBound(FDataPtr, 1) + 1
else
Result := 1;
end;
Code: Select all
Result := VarArrayHighBound(FDataPtr, 1) + 1
Re: Batch mode param value is null
Changes of the GetTableLength function in the Ora.pas module are caused by unification of Batch operations support in all DAC products