TOraScript and "SQLType"

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene

TOraScript and "SQLType"

Post by upscene » Thu 10 Mar 2005 09:15

Hi there,

Would it be possible to somehow know the sqltype of the current statement in the TOraScript component?

I figured I could use the .Dataset.SQLType property, but the Dataset is never assigned.

Any other way?

I would like to create a visual indicator of a transaction commit/rollback in the script, so I need to know the statement type...

Thank you.
--
Martijn Tonies
Upscene Productions

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 10 Mar 2005 16:19

You can assign TOraScript.DataSet property manually to some DataSet object, and all script's SQL will execute in this object, also you can move through scripts execution by calling TOraScript.ExecuteNext method. e.g.

Code: Select all

 procedure TForm1.FormCreate(Sender: TObject);
 begin
  OraScript1.DataSet := SmartQuery1;
 end;
 
 procedure TForm1.Button1Click(Sender: TObject);
 begin
  OraScript1.ExecuteNext;
 end;

upscene

Post by upscene » Thu 10 Mar 2005 21:54

Hello Alex,

Ah, I couldn't find neither the DataSet or the ExecuteNext stuff in the Help.

So, I can use a TOra command to execute script statements. That's good. Will the TOraScript events (like OnError and OnStatement) still fire?

Additionally, will the Ora-DataSet events BeforeExecute and AfterExecute fire?

(no, I didn't try yet, it's way too late to fire up Delphi now :wink: )

Thanks for the help.

--
Martijn Tonies
Upscene Productions

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 11 Mar 2005 09:20

All events in TOraScript and DataSet objects will be triggered as usual.

upscene

Post by upscene » Fri 11 Mar 2005 15:15

Alex,

Thanks. I'll take a look at that then.

--
Martijn Tonies
Upscene Productions

Post Reply