Jeremy Dunck wrote:
Hi Jeremy, > Yeah, adodbapi was doing something weird with the executeHelper, so we did > this: Yeah I worked that out but haven't gotten too far. I had to make a modification to function_get_sql_clause to support the MS TOP keyword. Also had to modify method_save to provide TOP support also. Now I'm stuck, again. :-/ Here is my latest traceback showing that date types are not being converted from their string representation into the actual data type: Traceback (most recent call last): File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 272, in run self.result = application(self.environ, self.start_response) File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 615, in __call__ return self.application(environ, start_response) File "C:\Python24\lib\site-packages\django\core\handlers\wsgi.py", line 161, in __call__ response = middleware_method(request, response) File "C:\Python24\lib\site-packages\django\middleware\sessions.py", line 76, in process_response datetime.datetime.now() + datetime.timedelta(seconds=SESSION_COOKIE_AGE)) File "C:\Python24\lib\site-packages\django\models\core.py", line 118, in _module_save s.save() File "C:\Python24\lib\site-packages\django\utils\functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "C:\Python24\lib\site-packages\django\core\meta\__init__.py", line 1031, in method_save ','.join(placeholders)), db_values) File "C:\Python24\lib\site-packages\django\core\db\base.py", line 10, in execute result = self.cursor.execute(sql, params) File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 592, in execute self.executeHelper(operation,0,parameters) File "C:\Python24\lib\site-packages\django\core\db\backends\ado_mssql.py", line 39, in executeHelper old_executeHelper(self, operation, isStoredProcedureCall, parameters) File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 552, in executeHelper self._raiseCursorError(DatabaseError,tracebackhistory) File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 407, in _raiseCursorError eh(self.conn,self,errorclass,errorvalue) File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 38, in standardErrorHandler raise errorclass(errorvalue) DatabaseError: ----------- Strategy 1: Traceback:Traceback (most recent call last): File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 539, in executeHelper raise DatabaseError(e) DatabaseError: (-2147352567, 'Exception occurred.', (0, 'ADODB.Parameter', 'Application uses a value of the wrong type for the current operation.', 'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240652, -2146824867), None) ----------- Strategy 2: Traceback:Traceback (most recent call last): File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 540, in executeHelper adoRetVal=self.cmd.Execute() File "<COMObject ADODB.Command>", line 3, in Execute File "C:\Python24\lib\site-packages\win32com\client\dynamic.py", line 251, in _ApplyTypes_ result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args) com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE DB Provider for SQL Server', 'Syntax error converting character string to smalldatetime data type.', None, 0, -2147217913), None) ----------- Strategy 3: Traceback:Traceback (most recent call last): File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 539, in executeHelper raise DatabaseError(e) DatabaseError: (-2147352567, 'Exception occurred.', (0, 'ADODB.Parameter', 'Application uses a value of the wrong type for the current operation.', 'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240652, -2146824867), None) ----------- Strategy 4: Traceback:Traceback (most recent call last): File "C:\Python24\lib\site-packages\adodbapi\adodbapi.py", line 540, in executeHelper adoRetVal=self.cmd.Execute() File "<COMObject ADODB.Command>", line 3, in Execute File "C:\Python24\lib\site-packages\win32com\client\dynamic.py", line 251, in _ApplyTypes_ result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args) com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE DB Provider for SQL Server', 'Syntax error converting character string to smalldatetime data type.', None, 0, -2147217913), None) --- ADODBAPI on command:INSERT INTO [core_sessions] ([session_key],[session_data],[expire_date]) VALUES (?,?,?) with parameters: ['73f7cab87733fc1fac258676de931134', 'KGRwMQpTJ3Rlc3Rjb29raWUnCnAyClMnd29ya2VkJwpwMwpzLjIxNzM0ZjA3YjI4OWFmYWVhNzBi\nZGE5MTBmMWVmYzU5\n', '2006-01-24 21:45:11.166000'] Any advise? Thanks, Rich