Hi,

the following code:

dbn    = "mysql://..."
db     = create_engine(dbn)
sql    = "INSERT INTO ..."
result = db.execute(sql)
assert result is not None
id = result.last_inserted_ids()

produces this error:

Traceback (most recent call last):
  File "DB.py", line 12, in __add_object_section
    section.set_id(result.last_inserted_ids())
  File "sqlalchemy/engine/base.py", line 608, in last_inserted_ids
    return self.executioncontext.last_inserted_ids()
AttributeError: 'NoneType' object has no attribute 'last_inserted_ids'

Can anyone explain what I am doing wrong?

Thanks,
-Samuel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to