Quick question: I just need another set of eyes on this as I cannot see
what is wrong:-
sth = $dbh.prepare("select sal.isid, sal.access_level from
roles_dev.spig_access_list sal, filer_uncs stdy where
stdy.foldertype_qualifier=sal.spig_project and
stdy.foldertype_qualifier=? ")
when executed generates an error of
C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:384:in `parse':
ORA-01003: no statement parsed (DBI::DatabaseError)
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:253:in
`initialize'
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:124:in `new'
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:124:in
`prepare'
from C:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:624:in `prepare'
from U:/Ruby_progs/sync/sync.rb:179
However - if I comment out this block of code, and skip to the next
block of code which reads:
sth = $dbh.prepare("select isid from
table(ldap.find_by_department(?))")
... this works perfectly.
I cannot see any difference here. Can anyone see anything obvious?
Thx
Quick question: I just need another set of eyes on this as I cannot
see what is wrong:-
sth = $dbh.prepare("select sal.isid, sal.access_level from
roles_dev.spig_access_list sal, filer_uncs stdy where
stdy.foldertype_qualifier=sal.spig_project and
stdy.foldertype_qualifier=? ")
when executed generates an error of
C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:384:in `parse':
ORA-01003: no statement parsed (DBI::DatabaseError)
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:253:in
`initialize'
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:124:in `new'
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:124:in
`prepare'
from C:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:624:in `prepare'
from U:/Ruby_progs/sync/sync.rb:179
However - if I comment out this block of code, and skip to the next
block of code which reads:
sth = $dbh.prepare("select isid from
table(ldap.find_by_department(?))")
.. this works perfectly.
I cannot see any difference here. Can anyone see anything obvious?
Thx
Maybe it's not in the SQL put in the process. Do you have any cursors or
whatever open when you issue the #prepare? Also the second SQL looks
quite strange to me. Not that it would explain why the second call works
but is this really valid Oracle SQL?
I'd try single quotes - maybe you've getting some sort of variable
interpolation?
···
On 08/09/05, Graham <gandalfmeister@gmail.com> wrote:
Quick question: I just need another set of eyes on this as I cannot see
what is wrong:-
sth = $dbh.prepare("select sal.isid, sal.access_level from
roles_dev.spig_access_list sal, filer_uncs stdy where
stdy.foldertype_qualifier=sal.spig_project and
stdy.foldertype_qualifier=? ")
when executed generates an error of
C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:384:in `parse':
ORA-01003: no statement parsed (DBI::DatabaseError)
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:253:in
`initialize'
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:124:in `new'
from C:/ruby/lib/ruby/site_ruby/1.8/DBD/Oracle/Oracle.rb:124:in
`prepare'
from C:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:624:in `prepare'
from U:/Ruby_progs/sync/sync.rb:179
However - if I comment out this block of code, and skip to the next
block of code which reads:
sth = $dbh.prepare("select isid from
table(ldap.find_by_department(?))")
... this works perfectly.
I cannot see any difference here. Can anyone see anything obvious?
Thx
--
Rasputin :: Jack of All Trades - Master of Nuns
GOT IT!.. It was the error message which was confusing me. What Oracle
was trying to say was that I didn't have access (by the user of the
connection) to one of the tables. Once I fixed this - it worked.
In answer to your 2nd part, the table() construct allow me to wrap the
return values of the stored procedure call to an Oracle / LDAP
interface as an anonymous table. Nice construct (no idea if any other
database would support it though)
Thanks for trying to assist... just talking about it helps
Graham
GOT IT!.. It was the error message which was confusing me. What Oracle
was trying to say was that I didn't have access (by the user of the
connection) to one of the tables. Once I fixed this - it worked.
Great! Error messages can be a nuisance sometimes.
In answer to your 2nd part, the table() construct allow me to wrap the
return values of the stored procedure call to an Oracle / LDAP
interface as an anonymous table. Nice construct (no idea if any other
database would support it though)
Ah! Learn something new every day... My guess would be that there is no
other database that supports this. After all it's Oracle.
Thanks for trying to assist... just talking about it helps
Graham