I am having a problem inserting binary data into an existing MS DB.
A very simple example is like this
class FooTable:
__tablename__ = 'mytable'
keycol = Column(String(15), nullable=False, primary_key=True)
bincol = Column(Binary(4), nullable=False)
def __init__(self, keyval, binval):
On Sep 18, 2008, at 4:08 PM, Doug Latornell wrote:
With some help from Ned Batchelder I was able to confirm that this is
a Python bug: http://bugs.python.org/issue1569356 that has been fixed
since the 2.5.2 release. Ned confirmed that the fix is included in
Python 2.6a3.
well
On Sep 19, 2008, at 3:25 AM, [EMAIL PROTECTED] wrote:
I am having a problem inserting binary data into an existing MS DB.
A very simple example is like this
class FooTable:
__tablename__ = 'mytable'
keycol = Column(String(15), nullable=False, primary_key=True)
bincol =
Good day.
I tried to perform a load test on my python web app using sqlalchemy
as follows:
1000 requests
20 concurrent connections
Towards the end, I started getting an error from sqlalchemy module:
TimeoutError: QueuePool limit of size 40 overflow 10 reached,
connection timed out, timeout 30
On Sep 19, 2008, at 10:05 AM, Alen Ribic wrote:
Good day.
I tried to perform a load test on my python web app using sqlalchemy
as follows:
1000 requests
20 concurrent connections
Towards the end, I started getting an error from sqlalchemy module:
TimeoutError: QueuePool limit of size
On Sep 19, 2008, at 11:16 AM, Alen Ribic wrote:
Michael, thank you for you reply.
Question: if my web request fails to return a response, hence request
method doesn't exit gracefully, could that perhaps cause a connection
not to be returned to a connection pool? Reason I ask this is that
There's no doubt that pyodbc is the better-supported option; the pymssql
module hasn't been updated in two years, and it relies on the Microsoft DB
lib, which has been deprecated for a long, long time and is no longer
supported, and may not even work with MSSQL 2008. Here's the deprecation
notice
On Sep 19, 5:21 pm, Michael Bayer [EMAIL PROTECTED] wrote:
On Sep 19, 2008, at 11:16 AM, Alen Ribic wrote:
if the thread in which the request was served continues to run, not
serve further requests, and does not clean up after itself, then the
connections held open local to that thread
On Sep 18, 2:54 pm, Michael Bayer [EMAIL PROTECTED] wrote:
2. more involved: catch change events and populate a Child.grandparent
relation(). 0.5 has made the AttributeExtension API public which
would be a good place to catch this event. The advantage to this is
that your Child has a
On Sep 19, 2008, at 11:47 AM, GHZ wrote:
On Sep 18, 2:54 pm, Michael Bayer [EMAIL PROTECTED] wrote:
2. more involved: catch change events and populate a
Child.grandparent
relation(). 0.5 has made the AttributeExtension API public which
would be a good place to catch this event. The
Hi,
I'm using SA 0.4.6 and I'm having trouble using the result of a
database function / stored procedure in an UPDATE statement (being
constructed with SQL expression lang). This happens to be for using
PostGIS columns; however, that is not relevant to the problem here. I
have tried doing
In response to myself ... I discovered that it was only when I was
specifying the function clauses as bind params in the conn.execute()
method that it was failing. The code I presented should actually be
working correctly.
To be explicit, this seems to be working:
Thanks for the responses so far.
The reason we tried pymssql is because it is much easier to get running on
OSX. At the moment our efforts to get pyodbc working on Macs have met with
alot of frustration.
However, we would have done things differently if we had seen different
wording in the
On Sep 19, 2008, at 12:52 PM, Hans Lellelid wrote:
Hi,
I'm using SA 0.4.6 and I'm having trouble using the result of a
database function / stored procedure in an UPDATE statement (being
constructed with SQL expression lang). This happens to be for using
PostGIS columns; however, that
On Sep 19, 2008, at 1:18 PM, Hans Lellelid wrote:
In response to myself ... I discovered that it was only when I was
specifying the function clauses as bind params in the conn.execute()
method that it was failing. The code I presented should actually be
working correctly.
To be
On Sep 19, 2008, at 1:24 PM, Sam Widmer wrote:
Thanks for the responses so far.
The reason we tried pymssql is because it is much easier to get
running on OSX. At the moment our efforts to get pyodbc working on
Macs have met with alot of frustration.
However, we would have done
ah. right, the parameter argument of execute() does not handle SQL
expressions as values - the keys are used to generate a corresponding
list of bind parameter clauses. Earlier versions of SQLA were more
liberal in this regard but the current behavior was based around
simplifying
On Sep 19, 2008, at 1:54 PM, Hans Lellelid wrote:
ah. right, the parameter argument of execute() does not handle SQL
expressions as values - the keys are used to generate a corresponding
list of bind parameter clauses. Earlier versions of SQLA were more
liberal in this regard but the
Hi John,
Is the column you're having issues with really a VARCHAR, or is the message
misleading? How did you create the table, pre-existing or via SQLAlchemy?
Can you show the schema and the code you're trying to access it with?
Thanks,
Rick
On Fri, Sep 19, 2008 at 2:54 PM, John Hampton
Rick Morrison wrote:
Is the column you're having issues with really a VARCHAR, or is the
message misleading? How did you create the table, pre-existing or via
SQLAlchemy? Can you show the schema and the code you're trying to access
it with?
It's a preexisting table. The column in the DB
Hmmm, looks to me as if SQLA is generating the query correctly, but that the
DBAPI passes along the Binary() value encoded in a Python binary string,
which MSSQL then interprets as Varchar, and then complains that it can't do
an implicit conversion. That's a surprise to me; I had thought that this
John Hampton wrote:
This is the same conclusion that I had while talking with Mike on IRC.
Mike believes that there are others out there that use MSSQL and
SQLAlchemy that have BINARY columns working fine. I was hoping that
this is true and someone who has had success could share an
On Sep 19, 2008, at 4:14 PM, Rick Morrison wrote:
Mike, any perspective on how difficult it might be to get the MSSQL
Dialect to emit the CONVERT syntax for binary fields, or would
converting the value itself using base64 encoding be the better path?
we've had the notion of
Hi,
I'm having problems with a process that uses an sqlAlchemy session,
and after that it forks. From that moment I have 2 processes (can be
more) that uses alchemy sessions.
Both processes fails with ProgrammingError: (ProgrammingError) SET
TRANSACTION ISOLATION LEVEL must be called before any
24 matches
Mail list logo