关于一个简单SQL语句执行问题? ( 积分: 50 )

  • 主题发起人 主题发起人 xyunyes
  • 开始时间 开始时间
X

xyunyes

Unregistered / Unconfirmed
GUEST, unregistred user!
insert into t_pop3email(fefrom,feto,fsendname,fsubject,fdate,fatachments,fcontents,fuid) values (
'MAILER-DAEMON@10.0.2.80','" " ','',
'failure notice','2005-05-17 17:31:14',
' ','I''m afraid I wasn''t able to deliver your message to the following address.
This is a permanent error; I''ve given up. Sorry it didn''t work out.

anshu@bamin.com Error Message: 550 550 <anshu`bamin_com>, No such user.

linhao@bamin.com Error Message: 550 550 <linhao`bamin_com>, No such user.

liqun@bamin.com Error Message: 550 550 <liqun`bamin_com>, No such user.

nick@bamin.com Error Message: 550 550 <nick`bamin_com>, No such user.

sch@bamin.com Error Message: 550 550 <sch`bamin_com>, No such user.

scwood@bamin.com Error Message: 550 550 <scwood`bamin_com>, No such user.

serf@bamin.com Error Message: 550 550 <serf`bamin_com>, No such user.

sfavre@bamin.com Error Message: 550 550 <sfavre`bamin_com>, No such user.

shagan@bamin.com Error Message: 550 550 <shagan`bamin_com>, No such user.

shanep@bamin.com Error Message: 550 550 <shanep`bamin_com>, No such user.

shores@bamin.com Error Message: 550 550 <shores`bamin_com>, No such user.

singera@bamin.com Error Message: 550 550 <singera`bamin_com>, No such user.


-------------------------------------------
the following is a part of original message:
Return-Path:
Received: from [222.76.248.178] by 10.0.2.80 with StormMail ESMTP id 29157.486699585;
Tue, 17 May 2005 17:30:30 +0800 (CST)
Message-ID: <03dc01c55ac3$380d3780$7c1ea8c0
From: &quot;=?gb2312?B?us207y3Q7dPxvuo=?=&quot;
To: &quot;=?gb2312?B?MjAxINajzqHOoQ==?=&quot;
Subject: =?gb2312?B?0NPEzzA11MIoMS0xNSm21NXK?=
Date: Tue, 17 May 2005 17:30:23 +0800
MIME-Version: 1.0
Content-Type: text/html;
charset=&quot;gb2312&quot;
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal','2')

以上这段SQL语句,在sql查询分析器可以执行。但在delphi中用SQL.TEXT:=sql语句,然后execsql,却一直出错。请大家帮帮忙看看......
 
insert into t_pop3email(fefrom,feto,fsendname,fsubject,fdate,fatachments,fcontents,fuid) values (
'MAILER-DAEMON@10.0.2.80','&quot; &quot; ','',
'failure notice','2005-05-17 17:31:14',
' ','I''m afraid I wasn''t able to deliver your message to the following address.
This is a permanent error; I''ve given up. Sorry it didn''t work out.

anshu@bamin.com Error Message: 550 550 <anshu`bamin_com>, No such user.

linhao@bamin.com Error Message: 550 550 <linhao`bamin_com>, No such user.

liqun@bamin.com Error Message: 550 550 <liqun`bamin_com>, No such user.

nick@bamin.com Error Message: 550 550 <nick`bamin_com>, No such user.

sch@bamin.com Error Message: 550 550 <sch`bamin_com>, No such user.

scwood@bamin.com Error Message: 550 550 <scwood`bamin_com>, No such user.

serf@bamin.com Error Message: 550 550 <serf`bamin_com>, No such user.

sfavre@bamin.com Error Message: 550 550 <sfavre`bamin_com>, No such user.

shagan@bamin.com Error Message: 550 550 <shagan`bamin_com>, No such user.

shanep@bamin.com Error Message: 550 550 <shanep`bamin_com>, No such user.

shores@bamin.com Error Message: 550 550 <shores`bamin_com>, No such user.

singera@bamin.com Error Message: 550 550 <singera`bamin_com>, No such user.


-------------------------------------------
the following is a part of original message:
Return-Path:
Received: from [222.76.248.178] by 10.0.2.80 with StormMail ESMTP id 29157.486699585;
Tue, 17 May 2005 17:30:30 +0800 (CST)
Message-ID: <03dc01c55ac3$380d3780$7c1ea8c0
From: &quot;=?gb2312?B?us207y3Q7dPxvuo=?=&quot;
To: &quot;=?gb2312?B?MjAxINajzqHOoQ==?=&quot;
Subject: =?gb2312?B?0NPEzzA11MIoMS0xNSm21NXK?=
Date: Tue, 17 May 2005 17:30:23 +0800
MIME-Version: 1.0
Content-Type: text/html;
charset=&quot;gb2312&quot;
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal','2')

以上这段SQL语句,在sql查询分析器可以执行。但在delphi中用SQL.TEXT:=sql语句,然后execsql,却一直出错。请大家帮帮忙看看......
 
顶一下,自己漫漫研究。呵。
 
//你将异常捕获
Close;
SQL.Clear;
SQL.Add(...);
SQL.Add(...);
SQL.Add(...);
Try
ExecSQL;
Except
On E:Exception Do
Begin
ShowMessage(E.Message + ':' + ADOQuery1.SQL.Text);
End;
End;
 
试试把fcontents字段的内容用Param来传,然后Parambyname().asmemo来赋值。
 
后退
顶部