Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

RFC调用问题

我想问下我再用RFC调用时候出现问题:

procedure TForm1.Button1Click(Sender: TObject);

var

Connection,Funct : variant;

begin

Connection:=SAPLogoncontrol1.NewConnection;

Connection.user:='likb';

Connection.System:='999';

Connection.Client:='999';

Connection.ApplicationServer:='192.168.0.10';

Connection.SystemNumber:='01';

Connection.Password:='likb147';

Connection.Language:='ZH';

SAPLogonControl1.Enabled:= false;

if Connection.LogOn(0,true) then

begin

SAPFunctions1.Connection:=Connection;

SAPFunctions1.RemoveAll;

Funct:=SAPFunctions1.Add('ZR_ZBOGS');

Funct.exports('P_JS').value:=3;

if not Funct.call then

application.MessageBox('no','no',0)

else

application.MessageBox('yes','yex',0);

end;

end;

当我在用delphi6编译的时候,出现的问题是 从Connection.user:='likb'; 这句开始出现问题.

问题的描述是这样的:

EAccessViolation with message ' access violation at address 0045C4C3 in module ' project1.exe'

read of address 00000000'. process stopped.

而我用delphi7编译的时候,一直执行的是 if not Funct.call then

application.MessageBox('no','no',0)

而不是下面的else 句,我想知道是为什么?

能给个详细的说明吗?

Former Member
Not what you were looking for? View more on this topic or Ask a question