Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Problems with \"!=\" on Oracle
Problems with "!=" on Oracle
Posted: 2007/10/17 00:06
 
I'm using AnyDAC 1.12.2 on an Oracle 10g database.
Everything works really fine except one thing.
It seems that AnyDAC cannot handle the "!="

With the following 2 statements I receive 2 different results
when using AnyDAC. When using SQLplus everything works as expected.

Both statements should return 1 row (yes, the one with the X)

SELECT dummy FROM dual WHERE dummy != 'Y'
-> AnyDAC returns 0 rows

SELECT dummy FROM dual WHERE NOT (dummy = 'Y')
-> AnyDAC returns 1 row

Any clues ??
Re:Problems with "!=" on Oracle
Posted: 2007/10/17 00:22
 
Hello

1) This issue was fixed in 2.0.
2) AnyDAC treat ! character as the start of macros. To overcome that, do one of following:
- use double sign - !!
- use <> instead of !=
- turn off macro processing, by setting ResourceOptions.MacroCreate = False, MacroExpand = False

Regards,
Dmitry
Re:Problems with "!=" on Oracle
Posted: 2007/10/17 01:19
 
Wow, what an extremely fast answer !!
Thanks for that.
I'm not that deep into AnyDAC itself.
Do I run into troubles if I turn off macro processing ??
Ok, right, how should you know what I'm doing ...
But I think I'm just doing standard things like
DQL, DML and I'm using transactions, i.e. AutoCommit is turned off.
Re:Problems with "!=" on Oracle
Posted: 2007/10/17 01:26
 
Do I run into troubles if I turn off macro processing ??
I think, you does not use AnyDAC macroses or escape sequences. So, you cannot be in troubles if you will turn off macro processing.
DQL, DML and I'm using transactions, i.e. AutoCommit is turned off. Looks like you are doing all right !