Save rtf stream in MS SQL server

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
zwakstroom
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 28.11.2006, 15:26

Save rtf stream in MS SQL server

Post 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
zwakstroom
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 28.11.2006, 15:26

Post by zwakstroom »

I figured out a workaround myself.

I deleted all newlines before query and it worked.

Greetings Zwakstroom
Post Reply