OCI8: illegal characters in SQL 
Author Message
 OCI8: illegal characters in SQL

I have a program which resembles all the example programs
but it's started to give me infuriatingly inexplicable
errors - mostly on OCIStmtPrepare, but sometimes on
OCIStmtExecute,: ORA-00911. All i'm doing is sticking
together a string with sprintf's with different numbers
of parameters etc, and my detiled logging shows
an entirely normal-looking SQL string which
sql-plus is perfectly happy to run, as expected.
I'm using MSVC6. Don't you hate the editor?
I enabled RTTI to see if it would let
me cast signed into unsigned chars with static_cast<> -
it wouldn't, so i'm stuck with old-style casts ...
Could this be a compiler thing? a configuration thing?
(the DB is set to use WEISO8859P1) Or maybe some
other obscure configuration issue?
Sheesh, I don't know _where_ to look.....

BTW it's just this _one_ query where I do _nothing_ different
 - go on, tell me that I'm nuts - 'cos that's where this
is driving me ......

Well okay I just ran some tests and _YES_, those fscking strings
are exactly identically the same, according to the MSVCRT
implementation of strcmp. The only difference is storage.
And no, before you ask, I'm not quite dumb enough to have put it on the
  This reminds me of an issue with BorlandC3.1, MS-Win3.1 and
Gupta SQLBase C-API about 5 years ago. there, the trick was
to allocate all the buffers and whatnot in global unmovable
memory, because the c-api was called-back from a hardware interrupt
service routine (netbios or IPX or something) and had to
know _exactly_ where in ram one had put one's buffers....

But how the blazes do I do that on NT? .....
Oh, look, it's the same - GlobalAlloc().

That's funny, GM_FIXED wont work. Oh well.

Yup, that settled its hash - _now_ it plays ball.
Problem solved. y'know, debugging is my favorite part !!

Well I guess I might as well send this anyway FWIW


Tue, 21 Aug 2001 03:00:00 GMT
 OCI8: illegal characters in SQL

Well, I assume you didn't include the ';' on the SQL statement when
submitting via OCI?

You might want to enable a client side NET trace and see what is
actually getting piped to the RDBMS.

Fri, 24 Aug 2001 03:00:00 GMT
 [ 2 post ] 

 Relevant Pages 

1. SQL illegal character question

2. SQL illegal character question

3. illegal character in sql statement (#202) in kind of using SAP

4. Illegal Characters in SQL

5. Illegal 'characters'?

6. XML BulkLoad error, Illegal qualified name character

7. Updategram illegal characters

8. Illegal Character (server.htmlencode ?)

9. Illegal Characters.

10. illegal character list?

11. Illegal characters

12. Illegal Xml character

Powered by phpBB® Forum Software