I am using a Text Area box that will let the operators leave notes for the next shift. But, it cannot seem to handle an apostrophe within the text. For instance, if they wrote “Screen Bill’s parts for a missing clamping ring”, it would fail.
I have bound this text area to a text field in SQL Server. If I enter the text with an apostrophe directly in the database, then it displays correctly on the screen. I only get the error when I write to the database. The error is “Gateway Error 301: SQL Error: Invalid SQL statement or JDBC escape, terminating ‘’’ not found.”
edit: While I’m here, I have another question about text area boxes. I am trying to display information that would typically be printed on an address label. The PLC sends a string to the printer that contains the escape sequences to create the individual lines of text (i.e. carriage returns, line feeds), and what I want to do is display the same info on the screen. I tried entering four lines of text in notepad, pasting it into my database, and the lines show up exactly how I need them to on the GUI. Would it be as simple to take my PLC string and strip out the printer-specific escape sequences and replace them with Windows CR? Ideas?