If you have string fields (VARCHAR, etc) that contain NEWLINE characters
within the strings:
DO NOT EDIT THOSE STRINGS USING THE ContentsTab IN-CELL EDITOR -
USE THE POPUP EDITOR ONLY! THE IN-CELL EDITOR REMOVES THE NEWLINES.
What happens:
If you bring up the ContentsTab view of your data, and
- one of the fields in the table is a VARCHAR-type field, and
- the data in one of the entries contains newlines within the string,
you will see the data displayed in that cell without any newlines. In
other words, you will see all of the lines of the mult-line text
displayed in a single line within the cell. If you click on that cell
(or tab into it) and the table is editable, the current release of
SQuirreL will let you edit that data, and when you leave the cell it
will replace the value in the DB with the value you just editing, which
does not contain the newlines.
To edit multi-line data, double-click on the cell to get the Popup
editing window, which shows the text correctly on multiple lines.
Since most VARCHAR-type fields are not usually used to contain
multi-line data, you probably have not seen this problem, but I wanted
to warn you about it just in case.
Example:
If a table contains a VARCHAR field named ADDRESS, and one of the
entries is:
"20 Elm St.\n
P. O. Box 123"
the ContentsTab will display:
"20 Elm St.P. O. Box 123"
If you edit the entry to say "Box 124" in the cell (without
double-clicking to get the popup window), the DB willbe changed to:
"20 Elm St.P. O. Box 124"
This problem has been fixed in the dev version by blocking in-cell
editing of data containing newlines in the cell. Note that the data is
still displayed as before (ie. all the text on one line) so you can see
it, but you can't edit it without using the Popup window.
Glenn
|