Dennis Lee Bieber wrote:
> On Sun, 14 Aug 2005 19:28:04 GMT, William Gill <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>>I have been trying to pass parameters as indicated in the api.
>>when I use:
>>
>> sql= 'select * from %s where cusid = %s ' % name,recID)
>> Cur
Steve Holden wrote:
> William Gill wrote:
>
>> I have been testing and it seems that:
>>
>> 1- Cursor.execute does not like '?' as a placeholder in sql
>>
> The particular format required by each DBI-compatible module should be
> available as the module's "paramstyle" variable. mxODBC, for exam
William Gill wrote:
> I have been testing and it seems that:
>
> 1- Cursor.execute does not like '?' as a placeholder in sql
>
The particular format required by each DBI-compatible module should be
available as the module's "paramstyle" variable. mxODBC, for example,
uses the "qmark" style, but
I have been testing and it seems that:
1- Cursor.execute does not like '?' as a placeholder in sql
2- Cursor.execute accepts '%s' but puts the quotation mark around the
substitution.
sql = 'select * from %s where cusid = ? ' % name
Cursor.execute(sql, (recID,))
still fails, but:
sql
William Gill wrote:
> I have been trying to pass parameters as indicated in the api.
> when I use:
> sql= 'select * from %s where cusid = %s ' % name,recID)
> Cursor.execute(sql)
> it works fine, but when I try :
> sql= 'select * from %s where cusid like %s '
> Cursor.execute(sql,(name,recI
I have been trying to pass parameters as indicated in the api.
when I use:
sql= 'select * from %s where cusid = %s ' % name,recID)
Cursor.execute(sql)
it works fine, but when I try :
sql= 'select * from %s where cusid like %s '
Cursor.execute(sql,(name,recID))
or
sql= 'select *