It sounds to me like you are using PayPal Payments standard.
When using paypal standard, the confirm page posts information directly to the paypal servers, this is why the Store Order summary and Details behaviors will not trigger off the submit order button. When a form submits to another page, it is not possible to use that form to trigger an action on the page that contains the form.
with paypal standard, the order summary table should have an order status column that is set to pending when the summary is first stored in the database.
You will need to set up an IPN page that can update the order status after the transaction is processed through paypal. More information on IPN can be found here:
ipn
For the error you are getting, you should double check a few things:
1) are there any server behaviors on your page that are using a different connection from the Store Order Summary behavior? specificly check the Store Order Details behavior, make sure they are using the same connection.
2) In the database, double check the privileges for the user, i am including a screen shot that shows how to set privileges in phpMyAdmin.


