My DB skills are not strong, so please forgive if this is a dumb question.
Why does the following from my db.py not do what I want it to do?
#################
db.define_table('foo',  Field('name', unique=True))

db.foo.truncate()
db.foo.insert(name='joe')
db.foo.insert(name='sally')
db.foo.insert(name='joe')

print "Tables"
print db().select(db.foo.ALL)

db.commit()
###################
Because I've defined the field 'name' to be unique, I expected some sort of
error to occur the second time I insert the row containing 'joe'. Instead, I
end up with a table with three rows: joe, sally, and joe. I'm using SqlLite.


Thanks,
C Helck

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to