![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Nov 21 2007 11:43 AM | Permanent Link |
adam | I am creating an SQL UPDATE Statement in the form:
UPDATE TableName SET Field1 = 'Value1', ... WHERE ID = 1 ; I am running code to substitute Field-names for Field1, Field2, etc & to substitute Field-values for Value1, Value2. Doing this allows me to run UPDATEs with canned data. When I try to substitute in the data from a Memo field I hit a double problem ... 1. The memo may contain apostrophies (i.e. "This was John's idea") 2. If it is multiline the memo contains end-of-line chars. Therefore I can't just call: Value1 := '''' + Memo1.Lines.Text + ''''; Is there a function hidden somewhere in the VCL or DBISAMlb that can manage this conversion for me?? i.e. a function in the form: MemoToStr(aStringList : TStringList) : String; ... or otherwise what is the best plan for posting memo data via UPDATE statements? adam |
Wed, Nov 21 2007 12:10 PM | Permanent Link |
Roy Lambert NLH Associates ![]() | adam
The embedded quotes can be handled by using QuotedStr rather than adding quotes yourself. The CRLF pairs are a fraction more difficult - 1. figure out what to replace them with and a) use the TStrings.DelimitedText property or b) use StringReplace to change them Roy Lambert |
Fri, Nov 23 2007 12:50 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Adam,
<< Is there a function hidden somewhere in the VCL or DBISAMlb that can manage this conversion for me?? >> Use the TDBISAMEngine.QuotedSQLStr method: http://www.elevatesoft.com/dbisam4d7_tdbisamengine_quotedsqlstr.htm -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, July 10, 2025 at 10:36 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |