Page 1 of 1

SQLType property to get statement type

Posted: Mon 21 Mar 2005 08:52
by upscene
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

Posted: Tue 22 Mar 2005 08:41
by upscene
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

Posted: Tue 22 Mar 2005 12:15
by Paul
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

Posted: Tue 22 Mar 2005 12:58
by upscene
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