[DB-SIG] delete the records query

Chris Curvey ccurvey at gmail.com
Thu Feb 2 13:58:38 CET 2006


Most likely, it's that you are not committing the transaction.

On 2/1/06, python eager <python_eager at yahoo.com> wrote:
>
>  Hi, This my code snippet.
> I am deleting records. But the sql statment working fine. but it will not
> delete. i have two files. one is db_connection, and other one is
> PerDetailsDAO.
>
> i am creating object in PerDetailsDAO for db_connection.py
> Thereafter executing the sql statement.
> But the particular record will not deleted.
> What is the error?
> Please rectify the problem
> Thank you
>
>
> *File Name : db_connection.py*
> **
> import cx_Oracle
> class db_connection:
>    def getConnection(self):
>         dbconnection = cx_Oracle.connect("username", "password",
> "hoststring")
>         cursor = dbconnection.cursor()
>         cursor.arraysize = 50
>         return cursor
>
>  *File Name : PerDetailsDAO.py*
> **
> class PerDetailsDAO:
>    def delete(self,pid):
>         con = db_connection()
>         cursor = con.getConnection()
>         sql = "DELETE FROM PERSONALDETAILS WHERE PID =100"
>         cursor.execute(sql)
> regards
> Python Eager
>
>
> ------------------------------
> Do you Yahoo!?
> With a free 1 GB, there's more in store with Yahoo! Mail.<http://us.rd.yahoo.com/mail_us/taglines/mailstorage/*http://mail.yahoo.com/>
>
>
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig
>
>
>


--
Nervous passengers are advised to wear a blindfold.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/db-sig/attachments/20060202/af33615a/attachment.html 


More information about the DB-SIG mailing list