Reputation: 57
So I recently had an error with the default oracle db.backend of django. I performed a raw query directly on my db and it throw me an "django.db.utils.DatabaseError: ORA-24450: Cannot pre-process OCI statement". I knew the query itself was valid, because it ran in the old flask application as well as in table plus.
I googled and did not really find anything useful on that topic, other than the generic error description.
I will put the answer for future readers here. Hopefully it is helpful.
Upvotes: 1
Views: 2248
Reputation: 247340
I think that the true reason for this error is that your query string contained invalid characters. Since you say that removing the comment helped, the invalid characters must have been in the comment.
Upvotes: 0
Reputation: 57
So you have to remove the comments. It is so easy but I found it nowhere and it was a wild guess when I was out of good ideas.
So just change your cursor.execute("SELECT * FROM your_db /*do the select*/")
to cursor.execute("SELECT * FROM your_db")
Upvotes: 2