線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:751
推到 Plurk!
推到 Facebook!

請幫忙看看錯在哪裡信息反映的不是Edit1的內容

答題得分者是:huwk
BIG-ROM
初階會員


發表:94
回覆:91
積分:37
註冊:2005-04-16

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-05-17 04:51:13 IP:220.110.xxx.xxx 未訂閱
各位先進您好,請幫忙看看錯在哪裡。 =============================================
procedure TINVOICE.SpeedButton1Click(Sender: TObject);
var
 INVO: string;
begin
if (All_Invoice.Text <>'All_Invoice') and (edit1.Text ='') Then
 showmessage('請輸入搜索條件');
 begin
  LJSJK.INVOICE.Active:=false;
  LJSJK.INVOICE.sql.Clear;
  INVO:='select * from [INVOICE] order by INID Desc';
  LJSJK.INVOICE.sql.Add(INVO);
  LJSJK.INVOICE.Active :=True;
begin
if (edit1.Text <>'') Then
showmessage('trim(edit1.Text)');        //******問題在這裡,信息反映的不是Edit1的內容,請問什麼原因?如何獲取Edit1的內容?
end;
end;
 end;
----------------------------------------
寫程序——新問題會接踵而來!
huwk
資深會員


發表:26
回覆:340
積分:323
註冊:2002-04-03

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-05-17 07:05:17 IP:211.76.xxx.xxx 未訂閱
建議你查一下trim的help 如下 Trims leading and trailing spaces and control characters from a string. function Trim(const S: string): string; Description Trim removes leading and trailing spaces and control characters from the given string S. 回傳值是一個字串,所以你就showmessage中就不要再用單引號了 so 原來的 if (edit1.Text <>'') Then showmessage('trim(edit1.Text)'); 應改成 if (edit1.Text <>'') Then showmessage(trim(edit1.Text));
------
熊的學習 http://huwk.blogspot.com
BIG-ROM
初階會員


發表:94
回覆:91
積分:37
註冊:2005-04-16

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-05-17 15:11:44 IP:220.110.xxx.xxx 未訂閱
謝謝!!問題解決了。    
引言: 建議你查一下trim的help 如下 Trims leading and trailing spaces and control characters from a string. function Trim(const S: string): string; Description Trim removes leading and trailing spaces and control characters from the given string S. 回傳值是一個字串,所以你就showmessage中就不要再用單引號了 so 原來的 if (edit1.Text <>'') Then showmessage('trim(edit1.Text)'); 應改成 if (edit1.Text <>'') Then showmessage(trim(edit1.Text));
寫程序——新問題會接踵而來!
系統時間:2024-06-28 1:41:37
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!