Hello,

>From Turbogears website I found out that mssql doesn't support offset 
>query.....

read below.....

On Wed, Jun 4, 2008 at 4:20 PM, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
>
>> Paginate uses the same output from the same method, but slices the
>> result differently, that's why it is important to not use .all() (if
>> you are not on MSSQL server, because MSSQL server does not support the
>> use of offsets in queries).
>
> I took off the .all() just to see what happens and here comes the
> error. So I guess I have to use .all()?!?
>
File 
"/usr/local/pythonenv/BASELINE/lib/python2.4/site-packages/SQLAlchemy-0.4.6dev_r4675-py2.4.egg/sqlalchemy/databases/mssql.py",
line 498, in do_execute
   cursor.execute("SET IDENTITY_INSERT %s OFF" %
self.identifier_preparer.format_table(context.compiled.statement.table))
SystemError: 'finally' pops bad exception
Error location in template file
'/home/unique/turbogears/xxxx/xxxx/templates/activexxxx.kid'
on line 25 between columns 3 and 72:
... <span py:content="activexxxxgrid(activexxxx)">some content</span ...



>  File 
> "/usr/local/pythonenv/BASELINE/lib/python2.4/site-packages/SQLAlchemy-0.4.6dev_r4675-py2.4.egg/sqlalchemy/databases/mssql.py",
> line 498, in do_execute

What is interesting is the end of the traceback not the beginning, but
I suspect the error you get is because you are using MSSQL and it does
not support offsets. I know some people are working on implementing an
offest support for MSSQL to be able to use proxy results instead of
using all() on MSSQL.

I guess my question is, if wanted to use offset. How would I do it?

>Postgresql, Mysql & Oracle all support offsets.

>AFAIK Oracle doesn't. You can fake it using an embedded SQL and the implicit
>rownum-column. but that will cost performance. If you can, keep a referernce
>to the cursor around.

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to