Blank line between lines: HELP! 
Author Message
 Blank line between lines: HELP!

Hi Everyone:

    I built a memo edit box
that can insert upto 1900 chars.
the problem I have is that data show
in both reportsmith field and tdbmemo
is  'blank' line betwen each line.

say I insert
'1111111111111111
22222222222222222'
to oracle database, but the real thing
show in tdbmemo and reportsmith are:
'1111111111111111

22222222222222222'

My code are the flwing:
procedure TCathConform.insertBtn2Click(Sender: TObject);
var
  Dumm1, Dumm2, Dumm3, Dumm4, Dumm5, Str1, Str2: string;
  i, j : integer;
begin
  Dumm1 := '''';
  Dumm2 := ' ';
  Dumm3 := '(';
  Dumm4 := ')';
  str1 :='';

  Screen.Cursor := CrHourGlass;
  with ConCMQ  do
  begin
    try
      close;
      Sql.Clear;
      Sql.Add('insert into ConCM');
      Sql.Add('(firstDay, MonOrYear, Conclusion)');
      Sql.Add('values');
      Str1 := '(:firstday, :monOrYear,';
      Sql.Add(str1);
      Sql.Add(dumm1);
      for i := 0 to Tmemo1.lines.count-1 do
      begin
        str1 := Tmemo1.lines[i];
        Sql.Add(str1);
      end;
      Sql.Add(dumm1);
      Sql.Add(dumm4);
      prepare;
      Params.ParamByName('firstday').AsDate := StrToDate(monthEdit.text);
      Params.ParamByName('MonOrYear').AsString := ConclusionType;
      ExecSql;
    except
     on E: EDataBaseError do
      MessageDlg(E.Message, mtinformation, [mbOK],0);
    end;
  end;
   InsertBtn1.Enabled := True;
   InsertBtn2.Enabled := False;
   InsertBtn3.Enabled := False;
   Screen.Cursor := CrDefault;
end;

{end of code}

    Any suggestion from your experienced programmer will
be greatly appreciated.

Wei Jiang



Sat, 19 Sep 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. STRANGE: BLANK LINE?

2. Blank line in TDBGrid

3. Read file line per line

4. Newbie question about moving thru table line by line

5. Can I turn 26 line mode to 50 line mode

6. Trouble printing a BST line by line

7. HELP: Retrieve a TMemoField and copy lines of text to TStrings object

8. displaying several lines of help above a search component

9. Help Needed linking to Sage Line 50 data via ODBC

10. Help, Please! - Color lines in memo

11. Line Drawing withough BGI Help

12. Need Help with breaking a string up to use multiple lines

 

 
Powered by phpBB® Forum Software