<br clear="all">hola tengo una duda como esta<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.experts-exchange.com/Programming/Languages/Scripting/Python/Q_21935351.html">http://www.experts-exchange.com/Programming/Languages/Scripting/Python/Q_21935351.html</a></div>
<div><br></div><div>en mi caso es casi igual pq busco la variable de un combobox, y trato de setear la variable dentro de la query</div><div>y solo pregunto por 1 sin embargo me sale como si me faltaran mas parametros</div>
<div><br></div><div>les paso aparte de la URL el codigo mio donde estoy tratando con la misma duda</div><div><br></div><div><div>cursor.execute('SELECT DISTINCT(flagCode) FROM iata_icao_codes WHERE Country=?', (country_selected))</div>
<div>flagCode = cursor.fetchone()</div><div><br></div><div>el error por ejemplo es en un combobox donde estan el listado de los paises, ejemplo en Angola me saca este error</div><div><br></div><div>sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 6 supplied.</div>
<div><br></div><div>si elijo otro por ejemplo: Argentina</div><div><br></div><div>sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 9 supplied.</div><div><br></div>
<div>el combobox esta ordenado alfabeticamente y como se ve el numero crece pues con Canada es una letra C mas abajo como la 20 y pico larga.. el error da nuevamente</div><div><br></div><div>sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 6 supplied.</div>
<div><br></div><div>ahora en sqlite3 yo pongo esto </div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">SELECT DISTINCT(flagCode) FROM iata_icao_codes WHERE Country='Argentina';</div><div>
mi respuesta es </div><div>AR</div><div><br></div><div>osea que funciona.. lo que no acabo de conjugar es meterle la variable como pudiera ser el comodin de </div><div><br></div><div>print "esto %s" % string</div>
<div><br></div><div>me explico?</div><div><br></div><div>saludos</div><div><br></div><div><br></div>-- <br><font color="#888888"><font color="#888888">Antonio Pe</font><span><font color="#888888">ñ</font></span><font color="#888888">a</font><span></span><br>
<font color="#888888">Secure email with PGP 0x8B021001 available at <a href="http://pgp.mit.edu" target="_blank">http://pgp.mit.edu</a><br></font></font><font color="#888888">
<font color="#888888">Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001</font></font><br>
</div>