Page 1 of 1

TOraScript - don't work SELECT

Posted: Tue 16 Aug 2005 07:33
by Viewer
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:

Posted: Tue 16 Aug 2005 09:09
by Paul
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.

Posted: Tue 16 Aug 2005 11:56
by Viewer
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?

Posted: Wed 17 Aug 2005 08:09
by Paul
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;
/