一个非常菜的问题
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft VBScript 编译器错误 错误 '800a0401'
语句未结束
/gxl/20031103/lan.asp,行9
DelphiASPObj.lan_method();
-------------------------^
这到底是怎么回事呢?谁能告诉我!
问题点数:20、回复次数:7Top
1 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-11-03 09:15:30 得分 0
>> 缺少 'End'
>>语句未结束
你的輸入不完整或最後沒有結束符啊!!Top
2 楼koma2003(koma)回复于 2003-11-03 09:21:09 得分 0
错误提示不是很清楚的告诉你了吗Top
3 楼pwzhu666(暴龙)回复于 2003-11-03 09:26:31 得分 0
看看你的begin 和 end 是不是一一对应的阿Top
4 楼gaoxiulan(lanlan)回复于 2003-11-03 09:28:56 得分 0
可是我根本不缺少end呀,我具体是这样的
首先建立一个Active library,然后新建一个Active server Object,取一个名字叫lan,然后对它新建立一个方法叫lan_method,然后注册,再然后在unit1.pas中针对这个方法编写了一小段代码,
procedure Tlan.lan_method;
begin
Response.Write('您的名字是:');
Response.Write(Request.Form.item['name']);
end;
然后我建立一个asp文档
<HTML>
<BODY>
<TITLE> Testing Delphi ASP </TITLE>
<CENTER>
<H3> You should see the results of your Delphi Active Server method below </H3>
</CENTER>
<HR>
<% Set DelphiASPObj = Server.CreateObject("Project2.lan")
DelphiASPObj.lan_method();
%>
<HR>
</BODY>
</HTML>
然后我又建立一个htm文档
<form name='form1' method=post action='lan.asp'>
姓名:<input type=text name=name>
<input type=submit value='OK'>
</form>
结果htm文档一点击OK提交,就是上面的错误了,难道我有哪里没有结束吗?Top
5 楼gaoxiulan(lanlan)回复于 2003-11-03 09:30:59 得分 0
begin和end倒不是一一对应,unit1.pas是这样的
unit Unit1;
interface
uses
ComObj, ActiveX, AspTlb, Project2_TLB, StdVcl;
type
Tlan = class(TASPObject, Ilan)
protected
procedure OnEndPage; safecall;
procedure OnStartPage(const AScriptingContext: IUnknown); safecall;
procedure lan_method; safecall;
end;
implementation
uses ComServ;
procedure Tlan.OnEndPage;
begin
inherited OnEndPage;
end;
procedure Tlan.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;
procedure Tlan.lan_method;
begin
Response.Write('您的名字是:');
Response.Write(Request.Form.item['name']);
end;
initialization
TAutoObjectFactory.Create(ComServer, Tlan, Class_lan,
ciMultiInstance, tmApartment);
end.
我只是加了一个procedure Tlan.lan_method;而已,其他的什么都没有动哦Top
6 楼netatomy(Chris)回复于 2003-11-03 09:58:56 得分 20
DelphiASPObj.lan_method();//去掉这个分号, VBScript语句结束不用分号的Top
7 楼gaoxiulan(lanlan)回复于 2003-11-03 10:05:07 得分 0
我天,真的是这么一回事,我吧;去掉,马上就好使了,thank you,给分Top




