definitely strange. If you want, you could debug what's happening in executesql looking at DAL (just search def executesql).... put a few debug lines and you should spot easily the error.....
In your case, you could replace executesql with this - basically skipping all code dealing with additional parameters def executesql(self, query, placeholders=None, as_dict=False, fields=None, colnames=None, as_ordered_dict=False): adapter = self._adapter if placeholders: adapter.execute(query, placeholders) else: adapter.execute(query) try: data = adapter._fetchall() except: return None return data as you can see, it's not that much of a difference between this and your example. The thing different is that DAL's fetchall()s while yours fetchone()s On Thursday, January 30, 2014 10:49:38 AM UTC+1, Oleg Marin wrote: > > > Web2py example from web-based shell > In [2] : len(seus_db.executesql("exec armSpins ?, ?;", (88,bytearray(b > "\x89\xa0H\'\x87\x13GF\xb5\xd6z\xe97\x15i\t")))[0].EVT_CONTENT) > *255* > > Pyodbc example from interactive python shell > >>> cur.execute("exec armSpins ?, ?;", 88, bytearray(b > "\x89\xa0H\'\x87\x13GF\xb5\xd6z\xe97\x15i\t") ) > <pyodbc.Cursor object at 0xb6c57e90> > >>> len(cur.fetchone().EVT_CONTENT) > 1024 > > > > > четверг, 30 января 2014 г., 0:06:10 UTC+4 пользователь Niphlod написал: >> >> post the code please. >> executesql('abc') just does >> >> cursor.execute('abc') >> cursor.fetchall() >> >> >> >> On Wednesday, January 29, 2014 12:55:51 PM UTC+1, Oleg Marin wrote: >>> >>> Hi! >>> >>> I'm using MSSQL2008 in readonly without tables definition, and when I >>> run stored procedure with executesql, it returns field of type binary(1024) >>> truncated to size of 255. Running same procedure directly with pyodbc works >>> well. Is it a bug, or something I have missed? >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.