From: <sk...@po...> - 2009-08-18 14:21:56
|
Suppose I have this query: select foo from bar where baz in ("A", "B", "C") and want to parameterize the where clause. I've tried this: query = 'select foo from bar where baz in "@type"' args = { "@type": ("A", "B", "C"), } but I get a TypeError (unsupported parameter type) when I try to execute the query. I manually tried creating DataBuf objects from various container types but they all failed: >>> sybase.DataBuf(1) <DataBufType object at 0x8366728> >>> sybase.DataBuf(()) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported parameter type >>> sybase.DataBuf([]) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported parameter type >>> sybase.DataBuf(set()) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported parameter type We are using an old version of the Sybase module (0.36) so this might have been something previously unsupported but which is supported in a later version, however I thought I would ask what the proper syntax for this is. Thx, -- Skip Montanaro - sk...@po... - http://www.smontanaro.net/ Getting old sucks, but it beats dying young |