Issue with single quote when adding record in text area

QuestionsIssue with single quote when adding record in text area
Daniel Ng asked 8 years ago

Hi,

I have an issue where when I create a record for a text field, if it contains a single quote ('), it will failed to be inserted into the SQL Server Database as the quote was not escaped.

However, if I were to edit a record to have single quotes, it will update without any issue. Is there something I must configure to make the insert record operation works with the single quote?

Regards,
Daniel Ng

3 Answers
Abu Ghufran answered 8 years ago

Hello,

I am unable to generate this issue.
It escaping properly on insert here for sqlserver.

I tested it on free/paid both.
More details would be required, e.g. exact data and screenshot.

daniel answered 8 years ago

Hi Abu,

Thanks for trying. I am using the Free version. Can I confirm when you attempted the insert, you are not doing via the inline insert on the grid but with the (+) button at the bottom of the tool bar which prompted a new Add page. My issue is on the new Add page.

I wasn't sure how I can provide the screenshot
But I create an entry and on the Description field, I type "test '" and upon saving, I am getting this query error and looking a the Insert statement, it wasn't prepending the single quote with another to make the insertion to be successful.

Couldn't execute query. SQLState: 42000 Error Code: 102 Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near '2016'. SQLState: 42000 Error Code: 105 Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Unclosed quotation mark after the character string ')'. – INSERT INTO [CFNFRaD].[dbo].[MFT_PSEL] (Platform,Affected_Item,Description,Start_time,End_time,Resolution,Owner) VALUES ('Director','test','test '','2016-08-25','','','Daniel Ng')

Again, this issue does not happen if I were to do any do the Edit Record page but only on the Add Record Page. More insight will be helpful.

Abu Ghufran answered 8 years ago

You can email me code+screenshot at [email protected]

Your Answer

9 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?