MSSQL LIKE and IN statements in ADO problem

gregarican greg.kujawa at gmail.com
Wed Jan 18 11:33:56 EST 2006


Can't you get rid of the Create Parameter part and directly pass along
the value you are looking for? Something like...

name = 'raj'
cmd.CommandText= \
        "SELECT * FROM tb_name WHERE firstname LIKE %%%s" % name

This way the value of the name variable gets passed along when the
CommandText method is invoked. BTW, this looks too painfully much like
Visual Basic than Python :-) Just kidding (kind of)




More information about the Python-list mailing list