TOraScript - don't work SELECT

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Viewer
Posts: 2
Joined: Tue 16 Aug 2005 06:43
Location: Russia, Samara

TOraScript - don't work SELECT

Post by Viewer » Tue 16 Aug 2005 07:33

I'm recompiled my project (Delphi7) with ODAC v. 5.55.0.21 and now don't work line in script text of TOraScript as

SELECT SEQUENCE_NAME.NEXTVAL FROM DUAL;

This using for synchronizing sequences in 2 databases (Oracle 9.2.0.6)
Previously project was compiled with ODAC v. 4.05.1.8 and this worked.
Is this a bag or that is now permanent in modern versions TOraScript and I'm must rewrite my code? :cry:

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Tue 16 Aug 2005 09:09

We cannot reproduce your problem with ODAC 5.55.0.21. Oracle client and server 9.2.0.1, Delphi 7.
I added your select SQL to the new TOraScript component and and was able to run it without error. What error message did you receive?
Send us please small demo project to demonstrate the problem and include script to create server objects.

Viewer
Posts: 2
Joined: Tue 16 Aug 2005 06:43
Location: Russia, Samara

Post by Viewer » Tue 16 Aug 2005 11:56

I'm not receive error message . Just not increased sequence last value number. All demo project to demonstrate this case is a one form with OraSession, OraScript and Button with on click event code like "OraScript.Execute"
And see
SELECT LAST_NUMBER FROM USER_SEQUENCES
WHERE SEQUENCE_NAME='SEQUENCE_NAME'
after script executions.
P.S.
I'm recompile project back with ODAC v. 4.05.1.8 and he once again work. What you tell me about it?

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 17 Aug 2005 08:09

TOraScript does not open SELECT queries and does not read fields (as it was released in ODAC 4.05.1.8).
You must run the following script to retrieve the next value of sequence.

Code: Select all

declare 
 v NUMBER;
begin
SELECT SEQUENCE_NAME.NEXTVAL into v FROM DUAL;
end;
/

Post Reply