pyodbc - problem passing None as parameter

Tim Golden mail at timgolden.me.uk
Fri Oct 23 05:30:00 EDT 2009


Frank Millman wrote:
> Thanks, Tim, for the detailed explanation. I appreciate your taking the 
> time.
> 
> It was difficult for me to use the code that you posted, because under my 
> present setup I define my SQL statements externally, and the WHERE clause 
> has to conform to one or more rows of six columns -
>     Test (WHERE or AND or OR)
>     Left bracket (either present or blank)
>     Column name
>     Operator
>     Expression
>     Right bracket (either present or blank)
> 
> I therefore used the workaround that I mentioned above, and it seems to work 
> fine, for both pyodbc and psycopg2.

I'm glad you managed to get something working. :)
I do similar things when needs be, being
more of a pragmatist than a purist most of the time.

(The should-NULL-be-special debate is occasionally
as fiery in the SQL world as the should-self-be-automatic
or tabs-or-spaces quesetions are in the Python world).

TJG



More information about the Python-list mailing list