From: Gavin Sinclair Date: 2003-01-31T00:21:11+09:00 Subject: Re: ruby-dbi and oracle error - ORA-24374 On Friday, January 31, 2003, 2:16:24 AM, Daniel wrote: > I've noticed a parsing problem with leading sql comments and sql that ends > with a placeholder. For example, > --random comment > select column1, column2 > from table1 > where somevalue > ? > In both ruby and TORA, this causes oracle error 24374: "define not done > before fetch or execute and fetch". However, I do not get this error via > sqlplus or TOAD, so I'm fairly certain it's not an Oracle client side issue. > It appears to be some sort of sql parsing problem. Interesting. What's TORA? > Interestingly, changing the "?" to a fixed value fixes the parsing error in > ruby-dbi, although TORA still chokes. > Is this an oracle driver problem or a ruby-dbi problem? And can it be fixed > (please)? A workaround would be to add a tautological line to your query. Like "and 1 < 2". Gavin