msi: Return ERROR_FUNCTION_FAILED when inserting duplicate keys.

This commit is contained in:
James Hawkins 2007-10-17 22:53:54 -05:00 committed by Alexandre Julliard
parent 1d0f9378bc
commit 46ec7ee183
2 changed files with 1 additions and 3 deletions

View File

@ -1490,7 +1490,7 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
/* check there's no duplicate keys */
r = msi_table_find_row( tv, rec, &row );
if (r == ERROR_SUCCESS)
return ERROR_INVALID_DATA;
return ERROR_FUNCTION_FAILED;
return ERROR_SUCCESS;
}

View File

@ -791,10 +791,8 @@ static void test_viewmodify(void)
ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n");
/* should fail ... */
todo_wine {
r = MsiViewModify(hview, MSIMODIFY_INSERT_TEMPORARY, hrec );
ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n");
}
r = MsiCloseHandle(hrec);
ok(r == ERROR_SUCCESS, "failed to close record\n");