Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cx_Oracle
- conexion='jaimeg/jaime_123@PRUEBA'
- db_conn = cx_Oracle.connect(conexion)
- cursor = db_conn.cursor()
- q = "insert into CONTACTO(codigo, nombres, apellidos, telefono, celular, pais, ciudad, direccion, email) values(:c1,:c2,:c3,:c4,:c5,:c6,:c7,:c8,:c9)";
- cursor.execute(q,c1=self.textCtrl1.Value,c2=self.textCtrl2.Value,c3=self.textCtrl3.Value,c4=self.textCtrl4.Value,c5=self.textCtrl5.Value,c6=self.textCtrl6.Value,c7=self.textCtrl7.Value,c8=self.textCtrl8.Value,c9=self.textCtrl9.Value)
- if cursor.rowcount == 0:
- db_conn.commit()
- cursor.close()
- db_conn.close()
- dlg = wx.MessageBox('Cogido ya agregado!!!!!!!','Agenda')
- else:
- db_conn.commit()
- cursor.close()
- db_conn.close()
- dlg = wx.MessageBox('Contacto Agregado','Agenda')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement