Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: DBI Deletes with placeholders

by talexb (Chancellor)
on Feb 04, 2008 at 14:34 UTC ( #665972=note: print w/replies, xml ) Need Help??


in reply to DBI Deletes with placeholders

Regarding your post, it's customary to wrap code sections in <code> tags. If you could update your post, that would be appreciated.

Regarding your DBI question, why don't you ask DBI what the problem is by outputting DBI->errstr in your error message, rather than a generic message? Also, I typically make a connection with RaiseError => 1

Another thing to check is whether the user you're connecting to the database as, has sufficient privilege to delete table rows.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^2: DBI Deletes with placeholders
by AKSHUN (Novice) on Feb 04, 2008 at 15:25 UTC
    DBI doesn't return any error. The code runs successfully, but the data remains in the database. I connect manually using SQLPLUS and I can see that the data is still there. I have the necessary privs on the database because I can delete them manually with a query.

    I believe the problem is that I am not properly using placeholders.

      In principle your code and SQL should work. One more thing you can try is to change your SQL from using DELETE to using SELECT - my guess is that your value in $var is wrong.

      Maybe the id column is a CHAR column instead of a number? Is the code you posted the actual code you're running? Maybe you can show us the real, actual code (minus the login to Oracle) you're using?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://665972]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-08-14 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?