Page 1 of 1

Save rtf stream in MS SQL server

Posted: 28.11.2006, 15:55
by zwakstroom
Hi,

I'm trying to save TStringStream, which has the rtf of a richedit in it.

When i execute a query in MS SQL server and pass the, stream.Datastring to the parameter with AsString. I get the error "unclosed quotation mark" from SQL Server.

Somehow the parameter is surrounded by ' (quotes) like a delphi string, but somehow SQL server sees a line ending half way. Therefore SQL server thinks the string is incorrectly terminated.

I already tried the parameter with LoadFromStream. Is there a way to get around this?

Many thanks, in advance.

Greetings Zwakstroom

Posted: 28.11.2006, 17:54
by zwakstroom
I figured out a workaround myself.

I deleted all newlines before query and it worked.

Greetings Zwakstroom