[sqlalchemy] How to get the character limit of a string or unicode table column

2009-11-15 Thread BruceC
Hi all, I'm trying to implement a character counter on all textarea fields in my Elixir-SQLA-Pylons app, need to find a way to determine the maximum number of characters a given column can hold, so I can supply the character counter with a Maximum characters value. Anyone know of a simple

[sqlalchemy] SQLAlchemy syntax for part of a datetime value in order_by.

2009-03-09 Thread BruceC
Hi all, I have a table with a column called created_at which is a datetime field. I'm trying to construct a query where I would like the results ordered by just the date portion of the datetime field, but I can't find any reference to the correct syntax for such a query. This works: query =

[sqlalchemy] Re: How to specify NOLOCK queries in SA (mssql)

2008-05-16 Thread BruceC
Hi Rick, This could involve quite a bit of investigation on our part, so it could take a while before we get to the bottom of it. We're running Windows 2003 as the OS, MS SQL Server 2005, via the SQL Server Native Driver, using PYODBC, Apache 2.2.6 mod_python 3.3.1. The app is based on Pylons,

[sqlalchemy] Re: How to specify NOLOCK queries in SA (mssql)

2008-05-14 Thread BruceC
have the luxury of not having our data used in a way that requires locking. This approach may not be appropriate for other users, but it does suit our needs, so we'll try this out... On May 14, 11:53 am, Michael Bayer [EMAIL PROTECTED] wrote: On May 13, 2008, at 9:46 PM, BruceC wrote: Hi all

[sqlalchemy] Re: How to specify NOLOCK queries in SA (mssql)

2008-05-14 Thread BruceC
Just to be a bit more specific, these are the changes we will try in our mssql db: ALTER DATABASE MyDBName SET ALLOW_SNAPSHOT_ISOLATION ON ALTER DATABASE MyDBName SET READ_COMMITTED_SNAPSHOT ON :) On May 14, 4:36 pm, BruceC [EMAIL PROTECTED] wrote: Thanks for your speedy response Michael

[sqlalchemy] How to specify NOLOCK queries in SA

2008-05-13 Thread BruceC
Hi all. I'm running a Pylons App using SA, Elixir connecting to a SQL Server 2005 db via PYODBC. I'm getting a lot of database locks, the statements appear to be like this: SET FMTONLY ON select table1.id from table1 where 1=2 SET FMTONLY OFF I'm assuming that this is getting information about

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-28 Thread BruceC
loading in various parts of the app... On Apr 28, 2:04 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 28, 2008, at 12:02 AM, Michael Bayer wrote: On Apr 27, 2008, at 9:58 PM, BruceC wrote: I don't know whether this helps, but many thanks for looking at the issue :) unfortunately

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread BruceC
Hi Michael, Thanks for your persistence :) I've searched through my app, we don't seem to have any calls to fetchone(), so I'm not sure what else to look for, but I'll try to do some debugging with ResultProxys, see if that leads to any possible answers. On a side note, in our Pylons

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread BruceC
Our Pylons setup emails every traceback error to our developers, with about 80 users, we've been getting a couple of hundred error emails a day, almost all with this same error (Tomorrow we will have about 1200 users on our system). The following is an excerpt of the traceback message. Every

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-24 Thread BruceC
Thank you to everybody for your comments on this problem... Michael, re: your suggestion about result.close(), is this something that I could add to mssql.py, or do you think it's something that I would need to add throughout my application everytime I access the db? (It's a big application...)

[sqlalchemy] Re: Pagination problems using SQLAlchemy MSSQL in Pylons - no OFFSET

2007-07-10 Thread BruceC
Thank you all for looking into this - most appreciated! On Jul 10, 6:13 pm, Paul Johnston [EMAIL PROTECTED] wrote: Hi, if 2005 supports ROW_NUMBER() OVER ORDER BY like oracle does, then yes this could be a possible feature enhancement. Another approach that occured to me is doing TOP