473,671 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to call to procedure without Cursor giving me a Statement Handle Error?

1 New Member
I have a a Procedure that invokes another procedure that returns a cursor. When I get to the FETCH Statement I get the following Error:

ORA-24338: statement handle not executed
ORA-06512: at "DATATRAN.PRC_S TATASCIREPORT", line 31
ORA-06512: at line 2

It is something probably so simple but I have been struggling with this for quit sometime so now I am reaching out for help.
Thanks
S

Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE PROCEDURE datatran.prc_statascireport
  2. AS
  3. cur_time VARCHAR2 (10) := TO_CHAR (SYSDATE, 'HH12:MI:SS');
  4. ERROR_CODE NUMBER;
  5. error_msg VARCHAR2 (300);
  6. sql_stm VARCHAR2 (1000);
  7. refcsr sys_refcursor;
  8.  
  9. TYPE recorg IS RECORD (
  10. idnumber VARCHAR2 (3 BYTE),
  11. loanofficer1 VARCHAR2 (3 BYTE),
  12. loanofficer2 VARCHAR2 (3 BYTE),
  13. loannum VARCHAR2 (5 BYTE),
  14. billcycle VARCHAR2 (1 BYTE),
  15. accrint NUMBER,
  16. earnstatus VARCHAR2 (1 BYTE),
  17. nonearningtype VARCHAR2 (3 BYTE),
  18. accrfloat NUMBER,
  19. futureddacharge NUMBER,
  20. accrfees NUMBER,
  21. earnstatus1 VARCHAR2 (1 BYTE)
  22. );
  23.  
  24. TYPE taborg IS TABLE OF recorg;
  25.  
  26. ltab taborg;
  27. BEGIN
  28. nela.pkg_aiagerp.sp_get_aiagerptdata@stnelapd ('A00', 'ZZZ', refcsr);
  29.  
  30. LOOP
  31. FETCH refcsr
  32. BULK COLLECT INTO ltab;
  33.  
  34. FOR i IN 1 .. ltab.COUNT
  35. LOOP
  36. DBMS_OUTPUT.put_line (ltab(i).idnumber);
  37. END LOOP;
  38. END LOOP;
  39.  
  40. END;
Dec 7 '10 #1
1 3399
amitpatel66
2,367 Recognized Expert Top Contributor
You cannot use a REF CURSOR that way by invoking a procedure remotely using a DBLINK.

Check Restrictions on Cursor Variables
Dec 9 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
18404
by: serge | last post by:
I am a little confused. If i have an SP like: CREATE PROCEDURE ABC (IN ID Integer, OUT TEST1 Integer, OUT TEST2 Integer) .... How do you call this SP? CALL ABC(varID, varTEST1, varTEST2);
2
5726
by: Schorschi | last post by:
Can't seemd to get ReadFile API to work! Returns invalid handle error? =========================================================================== Ok, the visual basic gurus, help! The following is a diskette class (vb .net) that works find, in that I can validate a diskette is mounted, dismount it, lock it, unlock it, get diskette geometry, etc., all with a valid handle from CreateFile API! I can even position the file pointer,...
13
2311
by: Marcin Wasilewski | last post by:
Hi, How to call procedure, which is on SQL Server from Access using visual basic? Thanks, mw
3
3058
by: Marcin Wasilewski | last post by:
Hi, I have a problem with calling procedure with parametrs. After run this code: .... Set strCommand = New ADODB.Command strCommand.ActiveConnection = cnn strCommand.CommandText = "ProcedureName" strCommand.CommandType = adCmdStoredProc
1
1482
by: simonZ | last post by:
How can I call sub from aspx page? If I have on aspx page grid view and I call procedure from item Template: <asp:GridView ... .... <ItemTemplate> <%# test()%> and in code behind: protected String test()
7
2262
by: Ryan | last post by:
I'm creating a user control that has a handful of controls on it (19 in total). One of the controls on the UC is a textbox for a user's password, so I've set the PasswordChar property to "*". I rebuild and all is well. The problem arises when I have the PasswordChar set, and then try to set Localizable to True for the UC. If I set Localizable to true and have PasswordChar set and rebuild, Visual Studio 2005 will then try to reload the...
1
13944
by: sranger | last post by:
When I try to use a System.IO.Ports.SerialPort object to read from a serial port, half of the time I have no problems. However, after I successfully read from the serial port, then close the connection, either when re-opening it (in the same instance or a new instance of my program) I get either an IOException "The Handle is Invalid" exception or an ArgumentException "The portName is invalid. Now, I get the port name by doing this: String...
4
3570
by: gregpinero | last post by:
It's the strangest thing, I'm pulling some text out of a MySQL table and trying to run exec on it, and it keeps giving me a syntax error, always at the end of the first line. Thanks in advance for any help. I'm really stuck on this one! -Greg I'm not sure what information would be most useful but here's a start:
1
1829
by: rick | last post by:
Hi I m facing a weird problem when i m executing a procedure with different IDs, The procedure has a select statement , and a codition. when the conditon is met an update statement is ran to update the selected records. The procedure has been given privleges to a DBAgroup , all the user IDs i m using belong that perticular group.
3
2746
by: shalskedar | last post by:
In my Db i need to update 3 columns..Below is my code to update but giving me an error...Can anyone Plz help me with this... str = "update set .='" & UserForm1.TextBox2.Text & "'"&","&.='"&UserForm1.TextBox1.Text & "'" ,.= '" & UserForm1.ComboBox1.Text & "'"
0
8401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8824
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8603
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8673
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7444
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2818
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.