菜鸟系列3(大侠救命)(100分)

H

hbffff

Unregistered / Unconfirmed
GUEST, unregistred user!
一个webserver(isapi.dll)
上有clientdataset,midaspageproducer,socketconnection
基本意图:
客户注册信息提交到webserver,
clientinfo_cds.FieldByName('clientname').asstring:=
request.ContentFields.Values['公司名']
。。。。。
完成信息提交
『问题:提交后多了4条空记录
反馈信息通过midaspageproducer返回流然器
『问题:midaspageproducer.htmlfile要用到的image
文件无法显现(拷到虚拟目录指定的文件夹下也没用)

救命呀,分数不够请随意勒索
 
源码

type
TWebModule1 = class(TWebModule)
XMLBroker1: TXMLBroker;
MidasPageProducer1: TMidasPageProducer;
SocketConnection1: TSocketConnection;
clientinfo_cds: TClientDataSet;
PageProducer1: TPageProducer;
procedure WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
private
{ Private declarations }
function somethingWrong:boolean;
procedure insertNewRecord;
public
{ Public declarations }
end;

var
WebModule1: TWebModule1;

implementation
const Registerwrong='http://202.120.147.98:2001/page/page_local/client/client-register-return.htm';
Registerok='http://202.120.147.98:2001/page/page_local/client/client-register-return-ok.htm';
{$R *.DFM}

procedure TWebModule1.insertNewRecord;
begin
if clientinfo_cds.state=dsinactive then
begin
clientinfo_cds.CommandText:=
'select * from ep_clientinfo'+#13+
'where 0=1';
clientinfo_cds.open;
end;
clientinfo_cds.insert;
clientinfo_cds.FieldByName('clientname').asstring:=
request.ContentFields.Values['¹«Ë¾Ãû³Æ'];
clientinfo_cds.FieldByName('manager').asstring:=
request.ContentFields.Values['ÁªÏµÈË'];
clientinfo_cds.FieldByName('clientname').asstring:=
request.ContentFields.Values['Ö÷ÓªÒµ'];
clientinfo_cds.FieldByName('phone').asstring:=
request.ContentFields.Values['µç»°'];

clientinfo_cds.ApplyUpdates(-1);
end;

function TWebModule1.somethingWrong: boolean;
begin
//insertNewRecord
result:=false;
if request.ContentFields.Values['ÃÜÂë']<>
request.ContentFields.Values['ÃÜÂëÈ·ÈÏ'] then
begin
//response.SendRedirect(Registerwrong);
result:=true;
end;

end;

procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
if somethingWrong then
response.SendRedirect(Registerwrong);

try
insertNewRecord;
except
response.SendRedirect(Registerwrong);
end;


//response.SendRedirect(Registerok);

end;

end.
 
天哪,
用intrabob调试毫无问题
而用普通页面点击就是老问题,难道是IIS设置?
 
对不起,写错了
clientinfo_cds.FieldByName('clientname').asstring:=
request.ContentFields.Values['客户名'];
clientinfo_cds.FieldByName('manager').asstring:=
request.ContentFields.Values['经理'];
clientinfo_cds.FieldByName('lianxiren').asstring:=
request.ContentFields.Values['联系人'];
clientinfo_cds.FieldByName('phone').asstring:=
request.ContentFields.Values['电话'];

用intrabob调试毫无问题
而用普通页面点击就是老问题,why?


 
罢了,改投asp,
谁能告诉我在aspobject中如何运用六大对象,比方说建立一个
session('session1')
有相关文章吗
 
搜索一下
 
现在做了个asp组建,但调试时,加再一个host application
可以将aspobject的接口函数(未注册)作为dll的输出函数吗
 
看了帮助
1 Turn on debugging information using the Compiler tab on the
Project|Options dialog box, if necessary. Also, turn on Integrated
Debugging in the Tools|Debugger Options dialog.
2 Choose Run|Parameters, type the name of your ”Web Server“
in the Host Application box, and choose OK.
3 Choose Run|Run.
4 Set breakpoints in the Active Server Page.
5 Use the Web browser to interact with the Active Server Page.

这个”Web Server“ 是什么?IIssrv?
 
换个问题,大家斑斑忙
同事用vc写的控件在我的机子注册后,在使用时,出现"not check permission access is denied by object
 
毕业论文要动笔了,
再见大学
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
516
import
I
顶部