我想使用储存过程新增一下数据,用到adostoredproc
我的储存过程: procedure pkgsp_jczt( a_l_newztbh number,
a_l_oldztbh number,
a_vc_jjmc varchar2,
a_vc_jjdm varchar2, a_vc_fullname varchar2,
a_d_create date,
return_code out number,
return_str out varchar2
) ;
end PKG_XZZT;我的delphi代码:
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, bsSkinCtrls, bsSkinBoxCtrls, Mask;type
TForm1 = class(TForm)
bsSkinButton1: TbsSkinButton;
yztbh: TbsSkinEdit;
jjmc: TbsSkinEdit;
jjdm: TbsSkinEdit;
ztqc: TbsSkinEdit;
zdrq: TbsSkinDateEdit;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinStdLabel2: TbsSkinStdLabel;
ADOConnection1: TADOConnection;
ADOStoredProc1: TADOStoredProc;
ztbh: TbsSkinEdit;
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.bsSkinButton1Click(Sender: TObject);
begin
adostoredproc1.ProcedureName := 'pkgsp_jczt';
adostoredproc1.Parameters.Refresh;
adostoredproc1.Parameters.ParamByName('a_l_newztbh').Value:=ztbh.text;
adostoredproc1.Parameters.ParamByName('a_l_oldztbh').Value:=yztbh.text;
adostoredproc1.Parameters.ParamByName('a_vc_jjmc').Value:=jjmc.text;
adostoredproc1.Parameters.ParamByName('a_vc_jjdm').Value:=jjdm.text;
adostoredproc1.Parameters.ParamByName('a_vc_fullname').Value:=ztqc.text;
adostoredproc1.Parameters.ParamByName('a_d_create').Value:=zdrq.text;
adostoredproc1.ExecProc;
end;end.
以下是错误
Project project1.wxe raised exception class E01eException with message'ora-01005':null password given:logon denied'.Process stopped.Use Step or Run to continue.
我的储存过程: procedure pkgsp_jczt( a_l_newztbh number,
a_l_oldztbh number,
a_vc_jjmc varchar2,
a_vc_jjdm varchar2, a_vc_fullname varchar2,
a_d_create date,
return_code out number,
return_str out varchar2
) ;
end PKG_XZZT;我的delphi代码:
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, bsSkinCtrls, bsSkinBoxCtrls, Mask;type
TForm1 = class(TForm)
bsSkinButton1: TbsSkinButton;
yztbh: TbsSkinEdit;
jjmc: TbsSkinEdit;
jjdm: TbsSkinEdit;
ztqc: TbsSkinEdit;
zdrq: TbsSkinDateEdit;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinStdLabel2: TbsSkinStdLabel;
ADOConnection1: TADOConnection;
ADOStoredProc1: TADOStoredProc;
ztbh: TbsSkinEdit;
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.bsSkinButton1Click(Sender: TObject);
begin
adostoredproc1.ProcedureName := 'pkgsp_jczt';
adostoredproc1.Parameters.Refresh;
adostoredproc1.Parameters.ParamByName('a_l_newztbh').Value:=ztbh.text;
adostoredproc1.Parameters.ParamByName('a_l_oldztbh').Value:=yztbh.text;
adostoredproc1.Parameters.ParamByName('a_vc_jjmc').Value:=jjmc.text;
adostoredproc1.Parameters.ParamByName('a_vc_jjdm').Value:=jjdm.text;
adostoredproc1.Parameters.ParamByName('a_vc_fullname').Value:=ztqc.text;
adostoredproc1.Parameters.ParamByName('a_d_create').Value:=zdrq.text;
adostoredproc1.ExecProc;
end;end.
以下是错误
Project project1.wxe raised exception class E01eException with message'ora-01005':null password given:logon denied'.Process stopped.Use Step or Run to continue.
请检查TADOConnection的数据库连接属性,将LoginParamet的值设为假。