| 发表于:2008-01-18 16:28:035楼 得分:0 |
unit unit1; interface uses windows, messages, sysutils, classes, graphics, controls, forms, dialogs, stdctrls, olectrls, sapbapicontrollib_tlb, extctrls; type tform1 = class(tform) sapbapicontrol1: tsapbapicontrol; button1: tbutton; panel1: tpanel; procedure button1click(sender: tobject); private { private-deklarationen } public { public-deklarationen } end; var form1: tform1; connection,mat : variant; implementation {$r *.dfm} procedure tform1.button1click(sender: tobject); begin connection:= sapbapicontrol1.connection; if connection.logon then begin showmessage('logon'); (* call the object with the needed parameters *) mat:= sapbapicontrol1.getsapobject('bus1001','000000000000017550'); (* display material-description *) panel1.caption:=mat.materialdescription; end; end; end. sql语句写到什么地方,通过什么方式将sql语句传递,同时怎样取得返回的查询结果。 | | |
|