Well, the raw TSQL would be: select * from tb_name where firstname like '%raj%'
I think that would more translate to: name = "raj" cmd.CommandText = "SELECT * FROM tb_name WHERE firstname like '%%%s%%'" % name Perhaps issuing a print statement of the CommandText would help for future runs to determine if this is valid TSQL syntax? -Pete "gregarican" <[EMAIL PROTECTED]> wrote: > 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) -- http://mail.python.org/mailman/listinfo/python-list