Search This Blog

Wednesday, February 17, 2010

Auto SQL generation during update requires a valid SelectCommand

While populating a Postgres DB, some updates (not all) updates failed with the following exception:
Auto SQL generation during Update requires a valid SelectCommand.
at System.Data.Common.DbDataAdapter.Update (System.Data.DataRow[] dataRows, System.Data.Common.DataTableMapping tableMapping) [0x00000]

At first I thought it was due to having several update threads running, but even with a single thread running it still occurred.

The error showed up under Mono 2.4.1 running on Ubuntu 9.10. I was not seeing it under Mac OS running Mono 2.6.1 or Ubuntu 9.10 also running Mono 2.6.1.

Upgrading to Mono 2.6.1 seems to have fixed it, but I have also seen other odd exceptions specifically on that VM. It's possible that the VM has other issues.

Summary:
Platform: Ubuntu Linux 9.10, Mac OS Snow Leopard running Mono 2.4.1 and 2.6.1
Language: F#
Solution: Switching from Mono 2.4 to 2.6.1 appears to have solved it.

No comments:

Post a Comment