This project is read-only.


Apr 5, 2013 at 12:17 PM
How is the InsertOrUpdates() statement working?
Does it check the value of the field which is marked as PrimaryKeyField?

[Column(Member = "AD_GUID", Name = "AD_GUID", IsPrimaryKey=true)]

The field ad_guid is marked as PrimaryKeyField.
But after the InsertOrUpdate(), the row is not updated.
The result is another row with the same id the ad_guid field!
Apr 5, 2013 at 4:48 PM
Edited Apr 5, 2013 at 6:11 PM
InsertOrUpdate works by executing an Update statement first and then executing an Insert statement if no rows were updated. In your case the update statement must be failing to match the primary key properly in the where clause. Adding the following setting to you config file will make it so that you can see the command text that is getting executed (you can see it in the Visual Studio debug window).
      <source name="VfpClient" switchValue="Information" />
Could you add this setting and let me know what you find wrong with the update statement?