U4-10611 - Umbraco Migration Insert Escape issue

Created by Tom 31 Oct 2017, 15:25:44 Updated by Tom 31 Oct 2017, 15:25:44

'''What did you do?'''

Ran a custom migration that inserts data into a table using the following code: Insert.IntoTable("myTableName").Row(tableObject);

One of the tableObject properties had a string with a single quote in it e.g. "This isn't right"

'''What did you expect to happen?'''

The insert statement to escape the single quote like it does if you use Database.Insert(tableObject)

'''What actually happened?'''

Migration fails with the following error: System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 't'. Unclosed quotation mark after the character string ');

Comments

Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.4

Due in version:

Sprint:

Story Points:

Cycle: