[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-05-01 Thread Paul Johnston

Hi,

I've found SA/MSSQL is mostly stable now. I do have a few bugs 
outstanding, and I'm sure I'll need to dive into the source code again 
in the future, but it's comparably stable to the rest of SA.

The unit test failures are right down, at least on Windows. I haven't 
tested PyODBC on other platforms; we should do that ASAP (at least as a 
one off exercise). I'm definitely in favor of a buildbot although I 
can't easily offer hardware.

Anyway, I'm sure you're dying to hear the outstanding problems! Well, in 
my usual form of totally undecipherable notes for self, here they are:

#538 - identity insert problems
label subqueries in from clause - unit test proposed in #513 triggers this
new unit test - len(unistr) == db.func.length(unistr)
date formatting - pass as datetime objects not strings
make MSNVarchar derive from Unicode
#537 - scope_identity(). This always returns NULL on PyODBC ticket open 
on PyODBC tracker

BTW, I'm a bit worried that 0.3.7 has a bug that means fetch IDs doesn't 
work (except with PyMSSQL), but I haven't checked this. Hopefully we'll 
get these little issues fixed, then from 0.3.8 SA will always ship with 
all unit tests passing for MSSQL. Woo! :-)

Paul


Rick Morrison wrote:

 .3.6 was stable (at least for me).

 One of the issues to address is going to be the multi-DBAPI support. 
 Keeping all three stable at the same time can be tough. So starting 
 .3.7, making pyodbc the only supported configuration is OK with me, 
 although I'll keep pymssql up and running for the next couple of 
 releases, as we're using it here internally. Adodbapi is starting to 
 look like a lost cause: emails are going unanswered and there's been 
 no updates for quite some time.

 Speaking of testing, Paul has done a great job at bringing MSSQL up to 
 speed on a lot of the tests, and I believe there's only like four 
 tests that don't pass now, and I would wager those are because of 
 database feature issues, not overt bugs. Maybe it's time to start 
 putting MSSQL on the regular test rotation.



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-05-01 Thread Rick Morrison
The 0.3.7 bug is my fault, I checked in the changes without testing on
pyodbc. Didn't know that Mike would cut 0.3.7 the very next day! Guess I'll
get to use that buildslave for something after all...

Paul, I wasn't aware of scope_identity() not working on pyodbc, I checked it
in because it was your patch and I know you work on pyodbc. It worked OK
here with pymssql, so I let it go. Can you detail what the problem is with
pyodbc?

In the meantime, I'll make the @@IDENTITY version the default again until
it's straightened out.

Rick


On 5/1/07, Paul Johnston [EMAIL PROTECTED] wrote:


 Hi,

 I've found SA/MSSQL is mostly stable now. I do have a few bugs
 outstanding, and I'm sure I'll need to dive into the source code again
 in the future, but it's comparably stable to the rest of SA.

 The unit test failures are right down, at least on Windows. I haven't
 tested PyODBC on other platforms; we should do that ASAP (at least as a
 one off exercise). I'm definitely in favor of a buildbot although I
 can't easily offer hardware.

 Anyway, I'm sure you're dying to hear the outstanding problems! Well, in
 my usual form of totally undecipherable notes for self, here they are:

 #538 - identity insert problems
 label subqueries in from clause - unit test proposed in #513 triggers this
 new unit test - len(unistr) == db.func.length(unistr)
 date formatting - pass as datetime objects not strings
 make MSNVarchar derive from Unicode
 #537 - scope_identity(). This always returns NULL on PyODBC ticket open
 on PyODBC tracker

 BTW, I'm a bit worried that 0.3.7 has a bug that means fetch IDs doesn't
 work (except with PyMSSQL), but I haven't checked this. Hopefully we'll
 get these little issues fixed, then from 0.3.8 SA will always ship with
 all unit tests passing for MSSQL. Woo! :-)

 Paul


 Rick Morrison wrote:

  .3.6 was stable (at least for me).
 
  One of the issues to address is going to be the multi-DBAPI support.
  Keeping all three stable at the same time can be tough. So starting
  .3.7, making pyodbc the only supported configuration is OK with me,
  although I'll keep pymssql up and running for the next couple of
  releases, as we're using it here internally. Adodbapi is starting to
  look like a lost cause: emails are going unanswered and there's been
  no updates for quite some time.
 
  Speaking of testing, Paul has done a great job at bringing MSSQL up to
  speed on a lot of the tests, and I believe there's only like four
  tests that don't pass now, and I would wager those are because of
  database feature issues, not overt bugs. Maybe it's time to start
  putting MSSQL on the regular test rotation.



 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-05-01 Thread Rick Morrison
Good to hear that adodbapi is going to get some loving.

Here's a brain dump on Unix + ODBC:

There are a lot of commercial UNIX ODBC interfaces of varying
quality out there; I'm not familiar with any of them.

As usual with open source, there's not one but two options for free ODBC
software, unixodbc (http://unixodbc.org) and iodbc (http://iodbc.org). I've
used both, they both seem to work. For access to MS-SQL, they both depend on
FreeTDS ( http://freetds.org) for basic TDS communcation needs (TDS=Tabular
data stream: taken from Sybase).

pyodbc uses an ODBC provider, both the free options above and most if not
all of the commercial options should work.

Here's the current options for MS-SQL access from SqlAlchemy:

adodbi is Windows only, uses
COM objects to communicate with MS's ADO access.

pymssql is Windows/Unix (not sure about BSD/Mac), uses a very old TDS layer
known as DB-lib, which you've heard me complaining about many times. I was
using DB-lib to access MS-SQL from C programs back in the day. Rumour has it
you've done the same, so you know DB-lib.

pyodbc is Windows/Unix (again not sure about BSD/Mac), talks to an ODBC
provider as outlined above. Right now, this is most likely the best
supported way to access ODBC from Python.

There is also the mxPython ODBC interface, does basically what pyodbc does,
commercial with support. This is from the guy who wrote mxDate, which was
*the* way to do dates before Python 2.3 introduced the datetime module.
AFAIK, this would also depend on some ODBC provider on Unix like
unixodbc/iodbc/some commercial stack.

Rick


On 5/1/07, Michael Bayer [EMAIL PROTECTED] wrote:



 On May 1, 2007, at 4:17 PM, Rick Morrison wrote:

  The 0.3.7 bug is my fault, I checked in the changes without testing
  on pyodbc. Didn't know that Mike would cut 0.3.7 the very next day!
  Guess I'll get to use that buildslave for something after all...
 
  Paul, I wasn't aware of scope_identity() not working on pyodbc, I
  checked it in because it was your patch and I know you work on
  pyodbc. It worked OK here with pymssql, so I let it go. Can you
  detail what the problem is with pyodbc?
 
  In the meantime, I'll make the @@IDENTITY version the default again
  until it's straightened out.
 
  Rick
 
 

 on a related note I was contacted by Vernon Cole who says he is
 taking over maintenance of adodbapi, which is a good sign to have
 direct access to a DBAPI maintainer.

 whats the current option to talk to MS-SQL via unix ?  pymssql, or
 pyodbc with a commercial ODBC library ?  (are there free unix odbc
 libraries ?)



 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-27 Thread Rick Morrison
I'd be happy to host a buildslave here on a VM. AFAIK, the buildslaves
connect outbound to the master, which would work for me. As far as hosting
the master, I dunno -- we're out here in the hinterlands of Connecticut in
dynamic IP address land for now.


On 4/27/07, Michael Bayer [EMAIL PROTECTED] wrote:



 On Apr 26, 2007, at 6:31 PM, Rick Morrison wrote:

  Sounds like a great idea -- is there an existing buildbot master to
  tie into, or will the whole thing be new?
 

 well my limited understanding of buildbots says that we would need to
 make one that responds to SQLAlchemy version changes, since the
 main one at pybots.org responds only to Python builds ?  also it
 requires a persistent running service that is always connected to the
 master (which i feel is overkill), but we'd have to determine hosting
 for the whole thing.



 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Michael Bayer

mssql:// supports pyodbc.


On Apr 26, 2007, at 5:35 AM, durumdara wrote:


 Hi!

 I want to subst. my modpy webframework to Pylons.
 I want use ORM in DB handling.

 But we used DBISAM in our projects, and now we access tables via ODBC
 and pyodbc.

 I don't see any odbc database engine in SQLAlch.'s webpage.

 So I want to ask that there is no way to use ODBC connection?
 It is hard to code a new SQLA. db class?

 Thanks for your help:
 dd


 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Durumdara
Hi!

2007/4/26, Michael Bayer [EMAIL PROTECTED]:


 mssql:// supports pyodbc.


And how to I open the engine? (XXX is the name of the ODBC DataSource what I
want to open. It is DBISAM database).

from sqlalchemy import *
import pyodbc
db = create_engine('mssql://zeusweb', module=pyodbc)

The result is:

---
Error
---
AttributeError: 'MSSQLDialect' object has no attribute 'make_connect_string'
---
OK
---



Thanks for help!

dd

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Michael Bayer

On Apr 26, 2007, at 9:35 AM, Durumdara wrote:

 Hi!

 2007/4/26, Michael Bayer [EMAIL PROTECTED]:

 mssql:// supports pyodbc.

 And how to I open the engine? (XXX is the name of the ODBC  
 DataSource what I want to open. It is DBISAM database).

 from sqlalchemy import *
 import pyodbc
 db = create_engine('mssql://zeusweb', module=pyodbc)

 The result is:


use the trunk first of all since MS-SQL support is largely  
experimental, the import is already included in there so it should  
use pyodbc automatically (you can add the argument  
'module_name=pyodbc` to create_engine() to force it), and I dont  
know anything about pyodbc so the function that breaks the URL into  
odbc, given a URL of the form:

mssql://user:[EMAIL PROTECTED]/database

is:

 def make_connect_string(self, keys):
 connectors = [Driver={SQL Server}]
 connectors.append(Server=%s % keys.get(host))
 connectors.append(Database=%s % keys.get(database))
 user = keys.get(user)
 if user:
 connectors.append(UID=%s % user)
 connectors.append(PWD=%s % keys.get(password, ))
 else:
 connectors.append (TrustedConnection=Yes)



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Rick Morrison
.3.6 was stable (at least for me).

One of the issues to address is going to be the multi-DBAPI support. Keeping
all three stable at the same time can be tough. So starting .3.7, making
pyodbc the only supported configuration is OK with me, although I'll keep
pymssql up and running for the next couple of releases, as we're using it
here internally. Adodbapi is starting to look like a lost cause: emails are
going unanswered and there's been no updates for quite some time.

Speaking of testing, Paul has done a great job at bringing MSSQL up to speed
on a lot of the tests, and I believe there's only like four tests that don't
pass now, and I would wager those are because of database feature issues,
not overt bugs. Maybe it's time to start putting MSSQL on the regular test
rotation.



On 4/26/07, Michael Bayer [EMAIL PROTECTED] wrote:


 On Apr 26, 2007, at 5:53 PM, Rick Morrison wrote:

  Hey Mike, I think it may also be time to lift the experimental
  label from the MS-SQL module, waddyasay?.

 yeah thats no prob, seems like only the current trunk has a stable
 version tho ?

 
  It may not be a 100% first-class SA citizen yet, but I think it's
  damn close. If it will help with support, I'll donate a configured
  VM with an installed version of MSSQL 2005 along with a real live
  holographic whiz-bang M$ license and everything.

 of all the DB's it definitely gets the most external support.  I do
 have MSSQL 2005 running on a windows box here its just not in my
 normal course of testing procedures (largely because you guys are
 doing all the work testing anyway).




 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Michael Bayer


On Apr 26, 2007, at 6:15 PM, Rick Morrison wrote:

 .3.6 was stable (at least for me).

 One of the issues to address is going to be the multi-DBAPI  
 support. Keeping all three stable at the same time can be tough. So  
 starting .3.7, making pyodbc the only supported configuration is OK  
 with me, although I'll keep pymssql up and running for the next  
 couple of releases, as we're using it here internally. Adodbapi is  
 starting to look like a lost cause: emails are going unanswered and  
 there's been no updates for quite some time.

 Speaking of testing, Paul has done a great job at bringing MSSQL up  
 to speed on a lot of the tests, and I believe there's only like  
 four tests that don't pass now, and I would wager those are because  
 of database feature issues, not overt bugs. Maybe it's time to  
 start putting MSSQL on the regular test rotation.

OK...do we want to create a buildbot of some kind ?   we should  
probably get something going for oracle as well.




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Rick Morrison
Sounds like a great idea -- is there an existing buildbot master to tie
into, or will the whole thing be new?


On 4/26/07, Michael Bayer [EMAIL PROTECTED] wrote:



 On Apr 26, 2007, at 6:15 PM, Rick Morrison wrote:

  .3.6 was stable (at least for me).
 
  One of the issues to address is going to be the multi-DBAPI
  support. Keeping all three stable at the same time can be tough. So
  starting .3.7, making pyodbc the only supported configuration is OK
  with me, although I'll keep pymssql up and running for the next
  couple of releases, as we're using it here internally. Adodbapi is
  starting to look like a lost cause: emails are going unanswered and
  there's been no updates for quite some time.
 
  Speaking of testing, Paul has done a great job at bringing MSSQL up
  to speed on a lot of the tests, and I believe there's only like
  four tests that don't pass now, and I would wager those are because
  of database feature issues, not overt bugs. Maybe it's time to
  start putting MSSQL on the regular test rotation.

 OK...do we want to create a buildbot of some kind ?   we should
 probably get something going for oracle as well.




 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---