我在ORACLE中建有一个过程,代码如下,现在我在D6中用STOREPROC来调用他,可是出现了END OF THE TABLE的错误,D6中代码如下:
-------------DELPHI--------------
Active:= False;
chkuser.ParamByName('v_user').AsString:= edt_user.Text;
chkuser.ParamByName('v_pass').AsString:= edt_pass.Text;
chkuser.ParamByName('v_Result').AsInteger:=0;
Active:= True;
Chk_Result:= chkuser.ParamByName('v_Result').AsInteger;
------------ORACLE----------------
Create or Replace Procedure ChkUser_j01131(
v_user in operate_j01131.op_user%type,
v_pass in operate_j01131.op_pass%type,
v_result in out number)As
v_rec operate_j01131.op_id%type;
begin
select op_id into v_rec from operate_j01131
where op_user=v_user and op_pass=v_pass;
if v_rec > 0 then
v_result:=1;
else
v_result:=0;
end if;
end;这是为什么望解答
-------------DELPHI--------------
Active:= False;
chkuser.ParamByName('v_user').AsString:= edt_user.Text;
chkuser.ParamByName('v_pass').AsString:= edt_pass.Text;
chkuser.ParamByName('v_Result').AsInteger:=0;
Active:= True;
Chk_Result:= chkuser.ParamByName('v_Result').AsInteger;
------------ORACLE----------------
Create or Replace Procedure ChkUser_j01131(
v_user in operate_j01131.op_user%type,
v_pass in operate_j01131.op_pass%type,
v_result in out number)As
v_rec operate_j01131.op_id%type;
begin
select op_id into v_rec from operate_j01131
where op_user=v_user and op_pass=v_pass;
if v_rec > 0 then
v_result:=1;
else
v_result:=0;
end if;
end;这是为什么望解答
解决方案 »
- 现在delphi7开发C/S架构的数据库存取系统都用什么技术的啊
- 200元请高手指导套票打印!限南京!!
- 急,,,hlep webservice中能有form吗?
- 如何在Delphi程序中对Windows图元文件进行读写
- delphi如何连接oracle8数据库 -- 急!!
- 何如在一个局域网络上面连接后台的数据库
- 如何允许和屏蔽网络连接?就像一些软件防火墙那可以断开和连接网络!
- 如何连续监视远程屏幕(不用抓屏方法,太慢)谢谢!
- 关于MDI窗体的问题
- 巨好答的问题之二(如何打印一个dbgrid网格显示出来的所有记录)
- 关于通过DBComboBox向数据库里添加数据的问题?
- 急!!!!我的课程设计题目----《校历表的制作》 在线等
where op_user=v_user and op_pass=v_pass;这一句没有查到数据
where op_user=v_user and op_pass=v_pass;
where op_user=v_user and op_pass=v_pass;
有错,不能保证有一个值,
加个exceptin
v_result:=-1;
看看
如果消耗你太多的时间的话,希望你考虑一下TQuery组件:
var
blLogin : Boolean;
........ with qryChkUser do
begin
Close;
Sql.Add('select UserId from Tbl_User'
+' where UserId=''' +edtUserId.Text+''''
+' and Pswd='''+edtPswd.text+''''
);
Open;
end;
if qryChkUser.IsEmpty then
begin
Application.ShowMessage('无此人或密码错!');
Exit;
end
else begin
blLogin:=True;
end;