python - Cannot use parameter with pyodbc when dealing with 4D ODBC Server -


I can not find parametric queries that work with PoddBC and 4D Here is an example of simple and basic code (mySQL database) working through). Table B has two columns without any interruption.

  import pyodbc con2 = pyodbc.connect ('dsn = CRIPI-4D'); Cur2 = con2.cursor (); Keymap = {1: ('Aahah', Datamimett (1990,1)), 2: ('BCDFgh', Datetime Datete (1992 -2.1)), 3: ("aaa% 'aa', Datetime .date (19903,1)}; For Came: v = (K, kemap [k] [0]); Cur2.execute ("B (number, text) include values ​​(?,?); "V";  

I always get this error message:

  traceback (most recent call final): file "D: \ jlandercy Include in the  

Or, that connection has failed, but if I have a < Code> select this works if I am doing wrong.

Did you ( ) Instead of creating an object, have tried to enumerate the mapping? / P> For Cam: include cur2.execute ("b (number, text) values ​​(?,?);", K, keymap [k] [0]);


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -