DMLRefresh: ORA-01461 and ORA-01483

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
b-b
Posts: 10
Joined: Fri 19 Jul 2013 11:09

DMLRefresh: ORA-01461 and ORA-01483

Post by b-b » Mon 22 Jul 2013 09:28

Hello,
in the current version (9.0.2) and in the previous versions we got the oracle error messages
ORA-01461 and ORA-01483 after inserting and updating (with DMLRefresh option) in OCI-Mode. In direct mode everything works fine. Without DMLRefresh option it's fine, too.
It seems to be caused by an invalid parameter (-length) handling.
We have seen in the DB-Monitor that some paremeters are moved / shifted.
The error is thrown very often but not always. It seems to depend on the content and on the table structure.
Disabling or enabling unicode makes no difference. We use charset AL32UTF8.

Could you fix it, please?

Kind regards,


Bernd

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Mon 22 Jul 2013 09:52

Hello,

If this problem occurs just on definite data and table structure, please send the script for creating the table and a sample demonstrating the problem to alexp*devart*com, in order for us to be able to reproduce it and fix.

b-b
Posts: 10
Joined: Fri 19 Jul 2013 11:09

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by b-b » Mon 22 Jul 2013 13:12

Hello Alex,
I've send a small sample application to you.
The problem occurs only if OraClasses.UseMaxDataSize is false
(see: http://www.devart.com/forums/viewtopic. ... axdatasize).

Kind regards,


Bernd

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Thu 25 Jul 2013 14:42

Hello,

Unfortunately, I haven't received your letter, please send it once more

b-b
Posts: 10
Joined: Fri 19 Jul 2013 11:09

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by b-b » Thu 25 Jul 2013 14:46

Hi Alex,
I sent it again.

Kind regards,


Bernd

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Fri 26 Jul 2013 10:59

Hello,

Unfortunately,I haven't still received your letter. Please upload your sample to any file sharing service and provide the link to download

b-b
Posts: 10
Joined: Fri 19 Jul 2013 11:09

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by b-b » Mon 29 Jul 2013 07:39

Hi alex,
I sent an e-mail to you.

Kind regards,


Bernd

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Tue 30 Jul 2013 09:29

Hello,

I haven't still received your letter. If your sample is larger than 2 Mb, you can send it using the contact form

b-b
Posts: 10
Joined: Fri 19 Jul 2013 11:09

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by b-b » Tue 30 Jul 2013 09:30

Hi Alex,

here you can download it:
The password is: ******

I hope it works now

Kind regards,


Bernd

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Tue 30 Jul 2013 10:24

Hello,

I have downloaded your project and reproduced the problem. As soon as we have any results, we will inform you.

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by a-s-z » Thu 22 Aug 2013 06:21

Hi Alex,
AlexP wrote:Hello,

I have downloaded your project and reproduced the problem. As soon as we have any results, we will inform you.
Any news on this issue?

Best Regards,
Andre

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Thu 22 Aug 2013 09:40

Hello,

We are still working on this problem.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Wed 11 Sep 2013 12:20

Hello,

The UseMaxDataSize variable should be set to False only in case of using parameters (size of which is greater than 4K) in PL/SQL blocks and stored procedures/functions. In standard queries, the string parameter size can't be greater than 4K - and when disabling this variable, this error occurs. In your sample, you should set the variable to True, since you are using a regular SQL.

P.S. We recommend to change this variable just before working with large parameters in PL/SQL, and then return it to the standard value.

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by a-s-z » Wed 11 Sep 2013 13:40

Hi Alex,
AlexP wrote:The UseMaxDataSize variable should be set to False only in case of using parameters (size of which is greater than 4K) in PL/SQL blocks and stored procedures/functions. In standard queries, the string parameter size can't be greater than 4K - and when disabling this variable, this error occurs. In your sample, you should set the variable to True, since you are using a regular SQL.

P.S. We recommend to change this variable just before working with large parameters in PL/SQL, and then return it to the standard value.
Thanks for the clarification of the parameter limits.
Is it possible to remove this global variable and make it a property / option of the DataSet or StoredProc? Or is it possible to autodetect usage of a plsql block and do not have to set the option at all?

Usage of a global variable does not seem to be appropriate in this case. It will lead to problems e.g. when using multithreaded applications.

Regardless of the setting, there should not be any parameter corruption or similar issues when using wrong values.

Best regards,
Andre

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DMLRefresh: ORA-01461 and ORA-01483

Post by AlexP » Thu 12 Sep 2013 12:19

Hello,

You can determine the type of the executed command using the IsQuery and IsPLSQL properties. For example, in your query, you can modify the values of the global variable just before calling the ApplyUpdates method, e.g.:

Code: Select all

var
...,
tmpUseMaxDataSize: Boolean;

........

  tmpUseMaxDataSize := OraClasses.UseMaxDataSize;
  try
    OraClasses.UseMaxDataSize := not qry.IsPLSQL;
    qry.ApplyUpdates;
  finally
    OraClasses.UseMaxDataSize := tmpUseMaxDataSize;
  end;
We will consider the possibility to remove this variable and implement a separate option in DataSet

Post Reply