On Monday, June 10, 2024 at 1:04:12 PM UTC-7 clara wrote: Hi all, I have a web2py project in which I have used extensively pandas / sqlalchemy to read and write into the database. We have not created the models in web2py .
Now, I am migrating to using DAL. I have migrated all read operations to use DAL and I am now working with the write operations. In doing so, I came accross a very weird issue (possibly DAL bug?): Briefly if I do this: - Write a row to a table with pd.to_sql (pandas with sqlalchemy connector to mysql) - Read with DAL: the just added row is not returned. -> this is the issue. DAL does not show the just added row in the output query. - Read with pd.read_sql: the just added row IS returned. (I can also see the new row in mysql workbench or any other tool) [example elided] When I go to this controller in the browser , I get back the attached output. The record with id = 3 inserted shows with sqlalchemy connector but not with DAL connector. I would really appreciate some explanation here. Sorry for the long write-up. Thanks, Clara I haven't worked with the DAL using executesql() directly, so I don't know if there are issues with that. My first thoughts are that the panda writes may have missed a commit, but being able to see the new row in the workbench doesn't seem to support that idea. Good luck. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/2ace009d-620a-4e99-8a1e-791569a80383n%40googlegroups.com.