I am trying to access persistent data saved in an sqlite.db file without 
wiping it out.
I start an interactive session with just python and no web2py and enter the 
following:

>>> from pydal import DAL, Field

>>> db = DAL('sqlite://storage.sqlite', folder='home/cryptoj/venv', 
auto_import=True)

>>> db.define_table('persons', Field('name'))

Now I can create and save table data - after db.commit() the table is saved 
and I can read the table with DB Browser for SQLite. I can enter additional 
data from DB Browser and it too can be read in the interactive python 
session.

I close the terminal. I close DB Browser. Then I open DB Browser and the 
data is all there. Yet, when I go through the above commands, in a new 
session, it appears the db.define_table is dropping the existing data 
stored in storage.sqlite.

On the 2nd pass, if I don't define_table again there are errors and the 
existing data can not be read in the interactive session.

Thank you in advance for any recommendations, James.

 

-- 
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/e948567e-ffdf-4090-9e1c-3ca2b864ac2an%40googlegroups.com.

Reply via email to