Hello, I have a very simple standalone pyDAL program which defines a 
database in one module 
<https://github.com/metaperl/surgetrader/blob/master/surgetrader/db.py>:

db = DAL('sqlite://storage.db')
market = db.define_table(
'market',
Field('name'),
Field('low', type='double'),
Field('timestamp', type='datetime')
)

and simply inserts records into a SQLite database in another module 
<https://github.com/metaperl/surgetrader/blob/master/surgetrader/scan.py>:

id = db.market.insert(
name=market['MarketName'],
low=market['Low'],
timestamp=datetime.now()
)
print id

However, the ID of each inserted record is "1" regardless of how many times 
I run the program.

The full source code of db.py and scan.py are here:
https://github.com/metaperl/surgetrader/tree/master/surgetrader

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to