请问在DELPHI中怎么调用ORACLE的存储过程返回数据集!!急!!另有50分相送!没完呢,怎么没人里了! (50分)

  • 主题发起人 主题发起人 dae
  • 开始时间 开始时间
D

dae

Unregistered / Unconfirmed
GUEST, unregistred user!
1。服务器端的ORACLE我应该怎么写,用table类型delphi的ADO说不支持!
2。另有50分在其他贴里,一并奉送!
3。另外问一下在dbExpress 里怎么连接oracle啊,
oracle的连接字符串应该写在什么属性里?
 
连接Oracle先在你的客户端建立一个别名。
 
我可以用ADO连接oracle,可是我不知道dbExpress里在哪指定oracle连接串
 
要装一个客户端的,把Database设成你在客户端工具里建立的别名
 
oracle是好使的,客户端也能连上,可是我用dbExpress的sqlconnection时
不知道在那里写oracle的别名,属性里没有database啊!
 
双击你的dbExpress,我没用过这个控件、
 
好使了,谢谢yeath!!
能帮我解决第一个问题吗??
我着急!!
 
dbExpress中使用存储过程调用出如下错误:
sqlStoredProc1:Cursor not returned from Query.
 
你的存储过程怎么定义的?
 
你在Sql plus里执行能不能返回 结果集?
 
我不知道什么样的能返回结果集,我是这样定义的过程,不知道格式对不对:
CREATE OR REPLACE PROCEDURE BOMDETIAL(
ChildCode IN OUT varchar2,
ItemPro IN OUT varchar2,
EndAdd IN OUT varchar2
) IS
tCode varchar2(40);
tDept varchar2(10);
tProcess varchar2(40);
tEndadd varchar2(10);
Cursor SeleStruct is
select child_code from item_struct ;
Cursor SeleProcess is
select Dept_id from item_process where item_code = tCode;
BEGIN
OPEN SeleStruct ;
LOOP
FETCH SeleStruct INTO tCode;
EXIT WHEN SeleStruct %NOTFOUND;

BEGIN
tDept := '';
tProcess := '';
OPEN SeleProcess ;
LOOP
FETCH SeleProcess INTO tDept;
EXIT WHEN SeleProcess %NOTFOUND;
tProcess := tProcess || '-' || tDept;
END LOOP;
CLOSE SeleProcess ;
select end_address into tEndadd from item_process
where item_code = tCode and end_address is not null;
exception when no_data_found then
tEndadd := '-';
END;
ChildCode := tCode;
ItemPro := tProcess;
EndAdd := tEndadd;
END LOOP;
CLOSE SeleStruct ;
END;
/
 
应该没问题啊,能返回结果的。
 
可他就是不行啊,在ADO中显示错误信息是“绑定信息无效”。
dbExpress中使用显示错误信息是:“sqlStoredProc1:Cursor not returned from Query.”
还需要什么设置吗?
 
你不要在Delphi里执行这个存储过程,在Pl/sql developer里执行能执行?
 
我在SQLPLUS中用下面的方式调用,不知道方法对不对:
declare
a varchar2;
b varchar2;
c varchar2;
d varchar2;
begin
BOMDETIAL(a,b,c);
end;
出错:
The following error has occurred:

ORA-06550: line 2, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 2, column 3:
PL/SQL: Item ignored
ORA-06550: line 3, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 3, column 3:
PL/SQL: Item ignored
ORA-06550: line 4, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 4, column 3:
PL/SQL: Item ignored
ORA-06550: line 5, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 5, column 3:
PL/SQL: Item ignored
ORA-06550: line 7, column 12:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 7, column 2:
PL/SQL: Statement ignored




Details:
ORA-06550: line 2, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 2, column 3:
PL/SQL: Item ignored
ORA-06550: line 3, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 3, column 3:
PL/SQL: Item ignored
ORA-06550: line 4, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 4, column 3:
PL/SQL: Item ignored
ORA-06550: line 5, column 3:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 5, column 3:
PL/SQL: Item ignored
ORA-06550: line 7, column 12:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 7, column 2:
PL/SQL: Statement ignored
 
你的过程用什么创建的?
 
用SQLPLUS啊,没出错!
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部