<div>hi, i am using the same method what you suggest. While running the program i am getting the following error</div>  <div>&nbsp;</div>  <div>AttributeError: db_connection instance has no attribute 'paramstyle'</div>  <div>&nbsp;</div>  <div>Please rectify the error</div>  <div>&nbsp;</div>  <div>thank you</div>  <div>Python Eager<BR><BR><B><I>Andy Todd &lt;andy47@halfcooked.com&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">python eager wrote:<BR>&gt; Hi this my code snippet. This code will not execute. And also this code <BR>&gt; raise error.<BR>&gt; <BR>&gt; DatabaseError: ORA-01036: illegal variable name/number<BR>&gt; <BR>&gt; What is the problem. Please give me a solution. Is there any problem is <BR>&gt; sql statment please give the correct statment, i will apply that statment.<BR>&gt; <BR>&gt; <BR>&gt; _Code Snippet :_<BR>&gt; __ <BR>&gt; *def view_one(self,pid):<BR>&gt; *sql_pStmt = "SELECT
 FIRSTNAME,LASTNAME FROM PERSONALDETAILS <BR>&gt; WHERE PID = ?" <BR>&gt; cursor.execute(sql_pStmt,pid)<BR>&gt; <BR>&gt; Thank you<BR>&gt; <BR>&gt; regards<BR>&gt; Python Eager<BR>&gt; <BR><BR>From the cx_Oracle documentation (section 3) [1];<BR><BR>"""<BR>execute(statement, [parameters], **keywordParameters)<BR>Execute a statement against the database. Parameters may be passed as <BR>a dictionary or sequence or as keyword arguments. If the arguments are a <BR>dictionary, the values will be bound by name and if the arguments are a <BR>sequence the values will be bound by position."<BR>"""<BR><BR>From the DB-API specification [2];<BR><BR>"""<BR>paramstyle<BR><BR>String constant stating the type of parameter marker<BR>formatting expected by the interface. Possible values are<BR>[2]:<BR><BR>'qmark' Question mark style,<BR>e.g. '...WHERE name=?'<BR>'numeric' Numeric, positional style,<BR>e.g. '...WHERE name=:1'<BR>'named' Named style,<BR>e.g. '...WHERE name=:name'<BR>'format' ANSI C
 printf format codes,<BR>e.g. '...WHERE name=%s'<BR>'pyformat' Python extended format codes,<BR>e.g. '...WHERE name=%(name)s'<BR>"""<BR><BR>cx_Oracle uses the 'named' parameter style, your code uses the qmark <BR>style. To find out which style is applicable check the paramstyle <BR>attribute of your connection object. e.g.;<BR><BR>&gt;&gt;&gt; import cx_Oracle<BR>&gt;&gt;&gt; myConnection = cx_Oracle.connect('andy47/andy47@andy47')<BR>&gt;&gt;&gt; myConnection.paramstyle<BR>'named'<BR><BR>[1] http://starship.python.net/crew/atuining/cx_Oracle/html/cursorobj.html<BR>[2] http://www.python.org/peps/pep-0249.html<BR><BR>Regards,<BR>Andy<BR>-- <BR>--------------------------------------------------------------------------------<BR>From the desk of Andrew J Todd esq - http://www.halfcooked.com/<BR></BLOCKQUOTE><BR><p>
        
                <hr size=1> <a href="http://us.rd.yahoo.com/mail_us/taglines/virusmail/*http://mail.yahoo.com">Yahoo! Mail</a> - Helps protect you from nasty viruses.