implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
Table,Connection,Funct : variant;
r:integer;
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('ZBOGS');
Funct.exports('P_JS').value:=3; if not Funct.call then
showmessage(funct.exception) //问题就是在这里出现!
else
begin
// Table:=nil;
Table:=Funct.tables.item('IT_ZBOGS');
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add('insert into ttest(a,b) values(:a,:b)');
parameters.parambyname('a').value:=Table.value(1,2);
parameters.parambyname('b').value:=Table.value(1,5);
execSQL;
end;
end;
end;
end;end.
var
Table,Connection,Funct : variant;
r:integer;
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('ZBOGS');
Funct.exports('P_JS').value:=3; if not Funct.call then
showmessage(funct.exception) //问题就是在这里出现!
else
begin
// Table:=nil;
Table:=Funct.tables.item('IT_ZBOGS');
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add('insert into ttest(a,b) values(:a,:b)');
parameters.parambyname('a').value:=Table.value(1,2);
parameters.parambyname('b').value:=Table.value(1,5);
execSQL;
end;
end;
end;
end;end.
解决方案 »
- delphi 关于dom元素获取。 (使用mshtml IHTMLDocument)进入看详情!
- 请问哪位朋友知道如何注册两个热键?[内附一非常简单清晰的注册一个热键的例子,请点击进去查看]
- 一个很难的问题。 没有经验的就不用来了
- 如何用table将一个数据库的全部记录复制到另一个相同结构的数据库中,不用SQL
- 请教关于使用idFTP控件的问题
- 以前搞VB,想换语言,不知BCB开发效率高还是DELPHI开发效率高。
- 求救!kylix 在设计时按 run(f9) 能运行,而直接运行编译了的可执行文件却没反映???
- 谁教我什么是包,马上送出60分,先道先得
- 这台电脑划算吗?急!!急!!!,如何测试这台二手电脑?
- sendmessage不起作用
- delphi的选择
- 求透明listview控件
而用7.0的时候
if not Funct.call then
showmessage(funct.exception) (一直执行的是这句,知道为什么吗? 我已安装了SAP的客户端)
else 等等回来结帖!