From: Erik T. <er...@th...> - 2004-07-24 06:49:47
|
On Fri, 23 Jul 2004 14:19:32 +1000 Dave Cole <dj...@ob...> wrote: > Erik Thiele wrote: > > hi. > > > > > > i am trying to use python DB API 2.0. but i find the documentation > > for this not very sufficient. there seems to be no good example at > > all on the net. > > > > questions never covered and done wrong in almost all examples is the > > issue with escaping the datatypes. some really do > > c.execute("select from where x="%s"" % mystring) > > this is of course fatal since mystring may contain closing " and > > then sql commands. > > > > anyway... how do i get the module to work? > > FreeTDS has historically had problems with named parameters. Are you > able to test the same query using the Perl bindings to FreeTDS? i am using mxODBC, there it works. but not named parameters. it uses this ?-parameter thing, like all ODBC it sais. it seems like freetds has problems with timestamp columns. it returns them as hex data. datetime works. The term "timestamp" and "datetime" is what the SQL Enterprise Manager on SQL Server 7.0 on WinNT sais to be the datatype of the columns. i'm so confused :-) now i have a working mxODBC with broken mssql-timestamp and i have a working sybase python module with broken parameter passing and broken mssql-timestamp also. so maybe the timestamp thing really is a freetds issue. help! regards erik -- Erik Thiele |