<html><div style='background-color:'><DIV class=RTE>Hi,</DIV>
<DIV class=RTE>I am new in the forum...</DIV>
<DIV class=RTE>I have a little project to present in my class in python ,but I found troubles with my program... the program represent a class loggin ,to verify user and password&nbsp; from a table in sql oracle ...here is a part from the code ...I know I have so many mistakes ...that's why I ask you to help me...</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>N.B : my class should be called by another program (main program)and should not be the main ...</DIV>
<DIV class=RTE>my partners are developping there own programs like graphical loggin,creating tables ,inventories ...</DIV>
<DIV class=RTE>--------------------------</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>import cx_Oracle<BR>droit=""<BR>class Loggin(object):</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; </DIV>
<DIV class=RTE>&nbsp;def testuser(name_user,pass_user):</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.conn= cx_Oracle.connect('a5harris','a','Hades')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.curseur = self.conn.cursor()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.curseur.fetchall()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nblignes = self.curseur.rowcount<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print nblignes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.curseur.execute ("Select * from usagers")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.curseur.fetchone()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.curseur.fetchraw([numRows = self.curseur.arraysize])</DIV>
<DIV class=RTE>&nbsp;&nbsp;print self.curseur.fetchone()</DIV>
<DIV class=RTE>&nbsp;&nbsp;for i in range (nblignes):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.curseur.fetchone()</DIV>
<DIV class=RTE>&nbsp;&nbsp;print self.curseur.fetchone()[0]</DIV>
<DIV class=RTE>&nbsp;&nbsp;while nblignes:</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;if ( name_user=self.curseur.execute("select name from usagers where name='carl'")<BR>&nbsp;&nbsp;&nbsp;&nbsp; and pass_user=self.curseur.execute("select pass from usagers where name='carl'")):<BR>&nbsp;&nbsp;&nbsp;&nbsp;droit=self.curseur.execute("select droit from usagers where name='carl'")<BR>&nbsp;&nbsp;&nbsp;&nbsp;return droit</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;if ( name_user=self.curseur.execute("select name from usagers where name='ismail'")<BR>&nbsp;&nbsp;&nbsp;&nbsp; and pass_user=self.curseur.execute("select pass from usagers where name='ismail'")):<BR>&nbsp;&nbsp;&nbsp;&nbsp;droit=self.curseur.execute("select droit from usagers where name='ismail'")<BR>&nbsp;&nbsp;&nbsp;&nbsp;return droit</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;if ( name_user=self.curseur.execute("select name from usagers where name='hua'")<BR>&nbsp;&nbsp;&nbsp;&nbsp; and pass_user=self.curseur.execute("select pass from usagers where name='hua'")):<BR>&nbsp;&nbsp;&nbsp;&nbsp;droit=self.curseur.execute("select droit from usagers where name='hua'")<BR>&nbsp;&nbsp;&nbsp;&nbsp;return droit</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;if ( name_user=self.curseur.execute("select name from usagers where name='dominique'")<BR>&nbsp;&nbsp;&nbsp;&nbsp; and pass_user=self.curseur.execute("select pass from usagers where name='dominique'")):<BR>&nbsp;&nbsp;&nbsp;&nbsp;droit=self.curseur.execute("select droit from usagers where name='dominique'")<BR>&nbsp;&nbsp;&nbsp;&nbsp;return droit<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;if ( name_user=self.curseur.execute("select name from usagers where name='serge'")<BR>&nbsp;&nbsp;&nbsp;&nbsp; and pass_user=self.curseur.execute("select pass from usagers where name='serge'")):<BR>&nbsp;&nbsp;&nbsp;&nbsp;droit=self.curseur.execute("select droit from usagers where name='serge'")<BR>&nbsp;&nbsp;&nbsp;&nbsp;return droit<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;if ( name_user=self.curseur.execute("select name 
from usagers where name='abdel'")<BR>&nbsp;&nbsp;&nbsp;&nbsp; and pass_user=self.curseur.execute("select pass from usagers where name='abdel'")):<BR>&nbsp;&nbsp;&nbsp;&nbsp;droit=self.curseur.execute("select droit from usagers where name='abdel'")<BR>&nbsp;&nbsp;&nbsp;&nbsp;return droit</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; def getNext(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print self.curs.fetchone()</DIV>
<DIV class=RTE>&nbsp;def newSQL(self,monsql):<BR>&nbsp;&nbsp;self.curs.execute(monsql)</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE><BR>if __name__ == "__main__":<BR>&nbsp;maDb=Loggin()<BR>&nbsp;maDb.testuser("ismail","ismail")<BR>&nbsp;print maDb.conn<BR>&nbsp;maDb.getNext()</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>-------------------</DIV>
<DIV class=RTE>I don't have much time ...please help me</DIV></div><br clear=all><hr>Il ne vous reste qu’une semaine pour entreprendre un voyage virtuel dans le cadre du concours  <a href="http://g.msn.com/8HMBFRCA/2731??PS=47575" target="_top">Le tour du monde de MSN Recherche.</a> </html>