As Richard MacCutchan mentioned, you can check the value returned from the
ExecuteNonQuery
method to see how many rows were affected by your query. You should see a value of greater than zero in both cases if the queries were executed successfully.
Postgres can sometimes be strict on transaction control, and I can see you're not using transactions. Have you tried calling
BeginTransaction()[
^] to see whether this applies the changes to the database?
I don't see you closing the first connection either, so could there be a deadlock on the database caused by one connection remaining open with an uncommitted query?