On 8 Jul 2009, at 07:29, John Hampton wrote:

>
> John Hampton wrote:
>> So, the problem that I am having is that when I try to do a query,  
>> I get
>> back the following error:
>>
>> sqlalchemy.exc.ProgrammingError: (ProgrammingError) ('The SQL  
>> contains 0
>> parameter markers, but 1 parameters were supplied', 'HY000')
>
> Due to ticket #1313 I tried out the 0.6 branch.  It successfully fixed
> this issue.  So, not quite sure what it was, but it's fixed ;)

Thank you, John,

This also fixed my problem, which I have spent many hours today trying  
to sort out.  I googled quite extensively for it and found nothing, so  
I'll post it here in case anyone else googles it.

Using pyodbc and freetds on mac, the following would work happily:

import sqlalchemy as sa
engine = sa.create_engine(my_uri)
r = cnxn.execute("select * from mytable")
r.fetchone()

but using

r = cnxn.execute(u"select * from mytable")
# or
r = cnxn.execute(sa.text("select * from mytable"))

under SQLAlchemy 0.5.5 I got the following error message:

ProgrammingError: (ProgrammingError) Attempt to use a closed cursor.  
None None

and under SQLAlchemy 0.4.8 I got the error:

ProgrammingError: (ProgrammingError) No results.  Previous SQL was not  
a query. None None


Checking out the 0.6 branch seems to have fixed it entirely

Ed


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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