I went in to the ibm_db_sa code and made a change to make it compatible with 0.5.8. But, now I'm getting another error that I need to run down that is not python-related. I'm missing db2cli.dll on my system and don't know where I'm supposed to get it from. And, reading about it online leads me to believe it is a driver for linux/windows versions of db2 and not the AS/400. But, I'll dig in to that tomorrow.

    -Jim

On 2/24/2010 1:58 PM, Lukasz Szybalski wrote:
I would check with ibm_db_sa mailing list. Maybe their example is out
of date, or there is a fix for it?


Lucas

On Wed, Feb 24, 2010 at 1:51 PM, st...@mailbag.com<j...@qlf.com>  wrote:
Does anyone have a clue on this error?  Is it due to a change in
SQLAlchemy between 0.4.0 and 0.5.8?

-Jim

On Feb 19, 5:02 pm, Jim Steil<j...@qlf.com>  wrote:
Here is the traceback I get when following that recipe...

  >>>  import sqlalchemy
  >>>  from sqlalchemy import *
  >>>  import ibm_db_sa.ibm_db_sa
Traceback (most recent call last):
    File "<stdin>", line 1, in<module>
    File
"c:\python26\lib\site-packages\ibm_db_sa-0.1.6-py2.6.egg\ibm_db_sa\ibm_db
_sa.py", line 24, in<module>
      from sqlalchemy import sql, engine, schema, exceptions, logging
ImportError: cannot import name logging
  >>>

The recipe is assuming SQLAlchemy 0.4.0.  I'm using 0.5.8.

      -Jim

On 2/19/2010 5:17 PM, Lukasz Szybalski wrote:

http://code.google.com/p/ibm-db/wiki/README
Let us know if it worked for you.
$ python
Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import sqlalchemy
from sqlalchemy import *
import ibm_db_sa.ibm_db_sa
db2 = 
sqlalchemy.create_engine('ibm_db_sa://db2inst1:sec...@host.name.com:50000/pydev')
metadata = MetaData()
users = Table('users', metadata,
      Column('user_id', Integer, primary_key = True),
      Column('user_name', String(16), nullable = False),
      Column('email_address', String(60), key='email'),
      Column('password', String(20), nullable = False)
)
metadata.bind = db2
metadata.create_all()
users_table = Table('users', metadata, autoload=True, autoload_with=db2)
users_table
IBM_DB DB-API wrapper sanity test
Question is wether IBM_DB wrapper supports your as400 version. You
could try. I never found enough time to test the "read" functionality.
If you get it done then that would be nice as I have some data that I
need to read from there.
Thanks,
Lucas
On Fri, Feb 19, 2010 at 4:07 PM, Jim Steil<j...@qlf.com>    wrote:
These is definitely more one DB2 driver for the AS/400.  I seem to recall
seeing that there was working being done with one of them a couple years
ago, but don't recall which one.  And, I don't know the status.  Maybe a
better question would be...  Is there anyone else out there using SQLAlchemy
with DB2 on an AS/400?
     -Jim
On 2/19/2010 3:13 PM, Michael Bayer wrote:
On Feb 18, 2010, at 10:36 AM, Jim Steil wrote:
Hi
Just wondering if there is support for the IBM AS/400 database using
SQLAlchemy.
IBM produces a DB2 driver, dont know if that overlaps with AS/400
compatibility or not.
     -Jim
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.
--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.





--
Jim Steil
VP of Information Technology
Quality Liquid Feeds, Inc.
608.935.2345 office
608.341.9896 cell

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

Reply via email to