microsoft / microsoft/vscode-mssql

When adding a row fails in Edit Data, the row can't be attempted to be re-added

Open
#22,735 0 comments 0 reactions 1 assignee Claimed by @Benjin View on GitHub
Area - View/Edit data
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

Repro:
1. Create two tables, e.g. Types (ID, Name) and Pokemon (ID, Name, Type1, Type2)
2. Create a PK on Types and FK on Pokemon
3. Without adding any types, attempt to add a new Pokemon using Edit Data
4. Observe error message:

> Failed to save changes: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK__Pokemon__Primary__5BE2A6F2". The conflict occurred in database "TestDb", table "dbo.Types", column 'TypeID'.
> The statement has been terminated.

Expected:
Row is still displayed as "dirty", option to save row still is enabled

Reality:
Option to save row is disabled, row/cell states display as saved

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.