SQLType property to get statement type

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

SQLType property to get statement type

Post by upscene » Mon 21 Mar 2005 08:52

Hi,

From reading the documentation and trying, I can see the SQLType property returning a limited set of SQL types.

Is there are reason why it doesn't return all of the available types, eg: CREATE TABLE (01)?

I'm using the NET option.

--
Martijn Tonies
Upscene Productions

upscene

Post by upscene » Tue 22 Mar 2005 08:41

Or is there perhaps a way to call the OCIGetAttr yourself? I have been trying - via some Protected hacks but I can't seem to get a handle to the right thingy ... :?

I would like to know if some statement is executing some DDL or DML etc...

Anyone? Please? :wink:

--
Martijn Tonies
Upscene Productions

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

Post by Paul » Tue 22 Mar 2005 12:15

TOraDataSet.SQLType joins two results. First time you get result of SQLType after preparing the query. ODAC can distinguish SQL_SELECT,
SQL_UPDATE, SQL_DELETE, SQL_INSERT, SQL_PLSQL. Other SQL types are
represented as SQL_UNKNOWN.

ODAC in OCI mode can distinguish other SQL types after executing a statement.
It is approximately 180 types, the main part of them are the different types
of CREATE, ALTER, DROP statements.
ODAC with Net option does not support different types of CREATE, ALTER, DROP
statements and returns SQL_UNKNOWN after execution.

We will check the values of TOraDataSet.SQLType in ODAC with Net option
after statement execution and will return all types except CREATE, ALTER,
DROP.
So you can know if some statement is DDL or DML after TOraDataSet.Prepare or
after TOraDataSet.Execute

upscene

Post by upscene » Tue 22 Mar 2005 12:58

We will check the values of TOraDataSet.SQLType in ODAC with Net option
after statement execution and will return all types except CREATE, ALTER,
DROP.
Any reason why "all types except CREATE, ALTER, DROP"? Why not return the actual value and let the users (like me :D ) deal with the 180 types of statements? At least, then it would return what Oracle is reporting.

Seriously, I really would like to have all types.

Thanks for your patience.
--
Martijn Tonies
Upscene Productions

Post Reply