in reply to Problem with INSERT statement

Is it reaching your disconnect() call? It doesn't sound like it is.