ORA-01480 error problem

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Traptak
Posts: 26
Joined: Fri 29 Jun 2007 07:15

ORA-01480 error problem

Post by Traptak » Tue 07 Jan 2014 11:58

Hello,

I just changed my ODAC components to the newest 9.2.5 version. Earlier I have used version 7.1.0. After migration I have problem with opening some queries. In some cases ODAC give me an exception: ORA-01480 trailing null missing from STR bind value. I don't know - is it the newest version problem or older version. I wrote small test application which runs queries to the v$session view:

Code: Select all

OraSession1.Open;
OraQuery1.SQL.Text := 'select * from v$session v where v.username = :id';
OraQuery1.Prepare;
OraQuery1.ParamByName('id').AsString := '1234';
OraQuery1.Open;
This works correctly. If I make change value for param id to the value: '123' then exception is raised any time I call: OraQuery1.Open; But if I change SQL text to the value:

Code: Select all

OraQuery1.SQL.Text := 'select * from v$session v where v.username = ''123''';
then everything works correctly. I think the problem exist when string param has three or less chars. It does not matter if in OraSession.Options.UseUnicode or OraSession.Options.UnicodeEnvironment properties have value False or True. I'm using Delphi XE4 Professional. This problem is very very urgent for me.

best regards
Adam Siwon

Moehre
Posts: 42
Joined: Fri 11 Nov 2005 11:37

Re: ORA-01480 error problem

Post by Moehre » Wed 08 Jan 2014 09:43

I get the same error! Some queries are running without errors but result is always NULL !!

LeChuck
Posts: 6
Joined: Wed 08 Jan 2014 16:29

Re: ORA-01480 error problem

Post by LeChuck » Wed 08 Jan 2014 16:45

I get the same error and I'm upgrading from 9.1.4, so it's definitely an issue with the latest release. I'm using Delphi XE.
Please fix this. If there's any additional information I can provide to help narrow down this problem please ask.

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

Re: ORA-01480 error problem

Post by AlexP » Thu 09 Jan 2014 10:02

Hello,

Thank you for the information. We have reproduced the problem and will fix it as soon as possible

Traptak
Posts: 26
Joined: Fri 29 Jun 2007 07:15

Re: ORA-01480 error problem

Post by Traptak » Fri 10 Jan 2014 12:50

Hello,

do you have any information when approximately fix will be available to download? I must to plan what I should to do now and this information will be very valuable for me.

best regards
Adam Siwon

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

Re: ORA-01480 error problem

Post by AlexP » Fri 10 Jan 2014 14:46

Hello,

We plan to release the new version next month.

Traptak
Posts: 26
Joined: Fri 29 Jun 2007 07:15

Re: ORA-01480 error problem

Post by Traptak » Fri 10 Jan 2014 22:58

Hello,

I hope its only a joke. I don't need new version. But I realy need fix to the reported bug, because this bug makes current version completly unusable.

regards
Adam Siwon

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

Re: ORA-01480 error problem

Post by AlexP » Sat 11 Jan 2014 14:10

Hello,

In order to solve your problem delete the following lines in the procedure TCustomDASQL.ReadParams; in the DBAccess.pas unit:

Code: Select all

if Param.Size = 0 then
ParamDesc.SetSize(0);

Traptak
Posts: 26
Joined: Fri 29 Jun 2007 07:15

Re: ORA-01480 error problem

Post by Traptak » Sun 12 Jan 2014 10:07

Hello,

after correction everything works correctly. Thank you very much.

regards
Adam Siwon

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

Re: ORA-01480 error problem

Post by AlexP » Mon 13 Jan 2014 09:04

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

nasirnoor
Posts: 9
Joined: Wed 04 Jun 2008 20:13

Re: ORA-01480 error problem

Post by nasirnoor » Wed 15 Jan 2014 21:32

Hi,

We don't have DBAccess.pas on our system (I guess you get it if buying with source, right?), what could be the workaround for us as we are also receiving this error? Is there an older version that we can go back to? We are running XE5 Update 2 and latest version of ODAC downloaded from your site just last week.

Thanks.

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

Re: ORA-01480 error problem

Post by AlexP » Thu 16 Jan 2014 14:49

Hello,

As a workaround, you can avoid using of the Prepare method. We plan to release the new version at the end of this or early next month. We can also send you a night build, in which this problem is already fixed, however, we cannot guarantee stable work of the night build

nasirnoor
Posts: 9
Joined: Wed 04 Jun 2008 20:13

Re: ORA-01480 error problem

Post by nasirnoor » Sat 18 Jan 2014 00:15

Thanks for the reply and offer to send us a nightly build. I would prefer to wait for the stable release for this fix. In the meantime, are there any negative consequences or gotchas lurking if we stop using Prepare?

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

Re: ORA-01480 error problem

Post by AlexP » Mon 20 Jan 2014 10:09

Hello,

Query preparation allows to increase performance in case of frequent use of the query. As for the rest, if you don't use preparation, there will be no fallouts or errors.

valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

Re: ORA-01480 error problem

Post by valentl » Fri 14 Feb 2014 12:00

I have a problem with prepare also. With string parameters, with the newest ODAC version (9.2.5).
When I Close the query, set the param with parambyname('paramname').asstring, and after I prepare the query, and open it, the result is nothing :(
But, if I do not prepare the query, it works fine.
I tried to make a sample program with select dummy from dual where dummy= :p1, but the oracle gave me the ORA-01480 error.

Image

Before the 9.2.5, we used 9.1.4, and there is not problem with it. Delphi XE4

Post Reply