Hi,

i am playing around with sqlalchemy.orm and firebird server.

engine = 
create_engine('firebird+kinterbasdb://SYSDBA:masterkey@localhost/C:/path/to/database/DEMODATABASE.FDB')
db = engine.connect()
Session = scoped_session(sessionmaker(autocommit=False, autoflush=False, 
bind=engine))
session = Session()
base = declarative_base()
class UserOnline(base):
__tablename__ = 'USERONLINE'
NAME = Column('NAME', VARCHAR(60), primary_key=True)

query = session.query(UserOnline)
result = query.all()

this produces an error: NoSuchColumnError: "Could not locate column in row 
for column 'USERONLINE.NAME'"
But the colum exists!

Now I made an print to query, this produces:

SELECT "USERONLINE"."NAME" AS "USERONLINE_NAME" 
FROM "USERONLINE"

I use FlameRobin (a Windows Gui Tool for connecting directly to the 
firebird database, entered the query from above
and it doesn't work. After looking around it seems that the firebird 
database server doesn't accept the quotes. These
quotes are from dialect #3. I read in the SQLA documentation that per 
default the dialect #1 is used for connecting
to database. But why there are quotes?

Thanks for help

Kind regards,
Holger

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


Reply via email to