Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread V3 -> V4 ... multi-line INSERT problem
Tue, Feb 13 2007 9:23 AMPermanent Link

adam
Dear All,

The following works in V3.30:

INSERT INTO aTable
(Field1, Memo1)

VALUES
("Something",
"Some long multi-line section of text,
with carriage returns
and paragraph ends.

Then restarts, new paragraphs
etc.")

--

I have tried editing it under V4 so it looks like this:


INSERT INTO aTable
(Field1, Memo1)

VALUES
('Something',
'Some long multi-line section of text,
with carriage returns
and paragraph ends.

Then restarts, new paragraphs
etc.')

But the query doesn't run ... I get a "parse error".

Am I using the wrong syntax or is it impossible to pass multi-line data into V4 via SQL?



Adam.



Also, I regularly pass quite large chunks of data into BLOB fields in my tables. These are things like articles, documents even emails etc.

V3 has always coped really well with these long patches of data even when they contained "escape characters" (such as single-quotes, double-
quotes, back-slashes etc.)

Will V4 be so forgiving? or am I going to have to write code to make my raw data more acceptable to the new forms of V4 SQL?



Tue, Feb 13 2007 3:13 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< Am I using the wrong syntax or is it impossible to pass multi-line data
into V4 via SQL? >>

You have to use #13 and #10 instead of passing the literals like this:

INSERT INTO aTable
(Field1, Memo1)

VALUES
('Something',
'Some long multi-line section of text, '+#13+#10+
'with carriage returns'+#13+#10+
'and paragraph ends.'

..etc.

<< Also, I regularly pass quite large chunks of data into BLOB fields in my
tables. These are things like articles, documents even emails etc.

V3 has always coped really well with these long patches of data even when
they contained "escape characters" (such as single-quotes, double-
quotes, back-slashes etc.)

Will V4 be so forgiving? or am I going to have to write code to make my raw
data more acceptable to the new forms of V4 SQL? >>

As long as the characters aren't < Chr(32) (non-printable characters other
than tabs) then V4 will be just fine with them.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image