Just out of curisority do you have your database connection include file above the store cart summary insertation? Reason why I ask is that I manually created an ecart using the invididual server behaviours rather then the wizards and found that if I add the server behaviours for "store cart summary in database" and "store cart details in database" it wont automatically add the database connection. After many tests I had to add the database connection manually.
Chris