Stored Procedure 2 « Database « Spring Q&A





1. Need to have an EJB, DAO and call stored procedure    forum.springsource.org

I am new to Spring and while reading tutorials, I want to do something using Spring - Create a stateless session bean running in weblogic server that have a DataSource and ...

2. org.springframework.jdbc.object.StoredProcedure confusion    forum.springsource.org

org.springframework.jdbc.object.StoredProcedure confusion I'm confused about how to use the StoredProcedure class. It's subclassed from RdbmsOperation, and its doc page says the following: An "RDBMS operation" is a multithreaded, reusable object representing ...

3. JDBC - StoredProcedure    forum.springsource.org

Hi, I am calling an Oracle Stored Procedure with out parameters defined as DATE and NUMBER. I n the declareParameter call I have defined them as Types.INTEGER and TYPES.DATE For some ...

4. MSSQL Stored Procedure Call with NO Parameters    forum.springsource.org

MSSQL Stored Procedure Call with NO Parameters I'm getting this error "Missing IN or OUT parameter at index:: 1" when I'm trying to call a stored procedure in MSSQL. While perusing ...

5. Problem with org.springframework.jdbc.object.StoredProcedure    forum.springsource.org

Problem with org.springframework.jdbc.object.StoredProcedure i wrote a Procedure in my oracle db : create or replace package body test is procedure main_p(a in varchar2, b in varchar2) is begin //do something; end; ...

6. Spring hanging on stored proc call    forum.springsource.org

Spring hanging on stored proc call Hi, everyone. Spring is working fine on all my regular database calls (queryForObject, queryForList, etc.), and is saving me from otherwise having to do a ...

7. poor performance of Stored Procedure calls    forum.springsource.org

poor performance of Stored Procedure calls Hi to everyone. I am facing issue with the performance of Stored procedure that returns a resultset of about 500-600 elements. This is used for ...

8. Error handling while using stored procedure    forum.springsource.org

Hi, I have created a stored procedure class which extends spring storedprocedure. I am able to invoke the stored procedure correctly but I am not getting any exception if there are ...

9. Can't get result set when calling iSeries (AS400) Stored Procedure    forum.springsource.org

Can't get result set when calling iSeries (AS400) Stored Procedure I'm trying to call an iSeries (DB2/400) stored procedure: public FindTransactionsSP(DataSource dataSource) { super(dataSource, SQL); declareParameter(new SqlParameter("p_retailer", Types.INTEGER)); declareParameter(new SqlParameter("p_product", Types.CHAR)); ...





10. How to get return value from stored proc when setFunction(true)    forum.springsource.org

How to get return value from stored proc when setFunction(true) I want to use setFunction(true) in my StoredProcedure object, then have the SQL Server stored procedure return a value, but how ...

11. Measuring getConnection Method within the StoredProcedure class    forum.springsource.org

Measuring getConnection Method within the StoredProcedure class Hi, In an old jdbc implementation I used to measure the getConnection using a class that would have an Connection object and then the ...

12. Why hit error when call the StoredProcedure?    forum.springsource.org

Why hit error when call the StoredProcedure? I meet error while I want to get a return value from a function. The error is encounted in line "Map out = execute(hashMap);" ...

13. Stored Procedure Returns An Empty Map    forum.springsource.org

Stored Procedure Returns An Empty Map Here is the code I have: Code: /** * * @param dataSource * * @spring.constructor-arg ref="lemaDataSource" */ public RzSpMissionPerformanceDAOImpl(DataSource dataSource) { super(dataSource, STORED_PROC_NAME); declareParameter(new SqlParameter(RSID, ...

14. Problem with Arrays in StoredProcedure    forum.springsource.org

Problem with Arrays in StoredProcedure Again I am experimenting with stored procedures (Oracle 9i). Based on informations from other threads, I created a simple StoredProcedure. However, handling of an array parameter ...

15. How to pass Oracle Object Type to Stored procedure using JdbcTemplate?    forum.springsource.org

Hi, I am trying to call a stored procedure using JdbcTemplate class. My stored procedure expects an oracle object type. I went through SqlTypeValue class but it seems that setTypeValue() method ...

16. Help with Oracle stored procedure!!!!    forum.springsource.org

I am trying to write programs to invoke oracle stored procedure, and I tested the example program in spring doc http://www.springframework.org/docs/...toredProcedure And I found a dead loop in the spring frame ...





17. How to get the return value using StoredProcedure?    forum.springsource.org

How to get the return value using StoredProcedure? 1). My Stored Procedure is as below: create proc Test_sp @one int output, @two int output as select test.id, test.name, test.sum1, test.sum2, test.sum3, ...

18. stored procedure in spring    forum.springsource.org

stored procedure in spring hi, I am trying to call stored procedure through spring jdbc . But program is getting stuck at execute(hashmap) method. Interesting thing is that stored procedure is ...

19. Stored Procedure optional parameters    forum.springsource.org

Stored Procedure optional parameters Hi all, I am pretty new to the spring thing. I am trying to use a private inner class for calling a stored procedure that takes optional ...

20. Stored Procedure singleton instance    forum.springsource.org

Hi, I have a question regarding the usage of classes derived from org.springframework.jdbc.object.StoredProcedure. Is it safe to instantiate the stored procedure only once and then reuse the instance as often as ...

21. StoredProcedure class and Oracle PIPELINED functions?    forum.springsource.org

I've used the StoredProcedure class to return the results of a function that returns a ref cursor but I'm not sure how I can do this with a function that returns ...

22. getting sql errorcode after execute on StoredProcedure    forum.springsource.org

Hi All, I am trying to get sql errorcode after executing sybase stored procedure. I am using SpringStoredProcedure class and when we call execute on SpringStoredPrprocedure it returns HashMap object. In ...

23. Call stored procedure with Spring    forum.springsource.org

Call stored procedure with Spring I have a stored procedure with 1 parameter (P1 INOUT DECIMAL). My class extends Spring framework StoredProcedure class. It errors at line: Map outParams = execute(inParams); ...

24. Passing object argument to stored procedure    forum.springsource.org

Passing object argument to stored procedure Hi, I need to call a pl/sql stored procedure and pass it an object argument (something like: Code: CREATE OR REPLACE TYPE request AS OBJECT ...

25. Stored procedure compiled message    forum.springsource.org

Stored procedure compiled message Hi All, I am using JdbcTemplate to execute my stored procedures. Everything was working on our development machine.....but as soon as we deployed our code on QA ...

26. StoredProcedure and SQLInOutParameter    forum.springsource.org

Hello, I have extended StoredProcedure and am attempting to execute a SP with In, Out and InOut parameters. I'm getting a NumberFormatException on some the InOut fields (most are Types.DECIMAL, but ...

27. Problem with stored procedures    forum.springsource.org

Problem with stored procedures Hi to all, I am calling a stored procedure in hbm.xml file as follows.. {call emp1_query (?, ?, ?, ?)} and in my java class i ...

28. Stored Proc vs. Function    forum.springsource.org

Hi, I tripped over this the first time I tried to execute a Oracle Stored Proc, and extended StoredProcedure. In the formatting of the call it somehow got interpreted into the ...

29. Help using jdbcTemplate with stored procedures and java 1.4    forum.springsource.org

Help using jdbcTemplate with stored procedures and java 1.4 I'm trying to implement jdbcTemplate for accessing the DB in my application. We are using stored procedures (I found an example of ...

30. Stored Proc with cursor failing    forum.springsource.org

Stored Proc with cursor failing I have Oracle stored procedure with cusor (running fine from data browser (AquaFold) ), which keeps on throwing following error org.springframework.jdbc.BadSqlGrammarException: C allableStatementCallback; bad SQL grammar ...

31. Problem calling StoredProcedure with an out parameter    forum.springsource.org

Problem calling StoredProcedure with an out parameter Hi all, I looked at a couple of examples for using the StoredProcedure class. I've tried creating my own class and I am having ...

32. Stored procedures and Spring    forum.springsource.org

I am working on a Spring app where we will have to do database updates in stored procedures and we are planning to use the StoredProcedure class. My question is what ...

33. PRINT statements in stored procedures    forum.springsource.org

I have a stored procedure that has some PRINT statements in. These are handled as warnings (certainly on SqlServer, not sure about other vendors). Using plain jdbc, I can call Statement.getWarnings() ...

34. Using jdbctemplate to call storedprocedure    forum.springsource.org

Is it possible to use jdbcTemplate's query(String sql, Object[] args, int[] argTypes, ResultSetExtractor rse) to call stored procedure? where sql = "{call sp_name(?)}" args[0]=new String(paramValue) ? My intent here is to ...

35. Function sequence error in AS400 stored procedure call    forum.springsource.org

Nov 13th, 2006, 02:21 PM #1 jbrisbin View Profile View Forum Posts Private Message Junior Member Spring Team Join Date Jul 2006 Posts 17 Function sequence error in AS400 stored procedure ...

36. Confused about results from Stored Proc    forum.springsource.org

Confused about results from Stored Proc Hello, I can't seem to get my hands around what is probably a simple concept. I have an Oracle Stored Proc which is returning a ...

37. Stored Procedure Best Practices    forum.springsource.org

Stored Procedure Best Practices I have a best practices question. What is the prefered method for calling a stored procedure? Should I use the RDBMS object StoreProcedure or is it okay ...

38. how to pass arraylist to stored procedure with oracle in spring    forum.springsource.org

can anybody could suggest how to pass a arraylist of java objects(e.g Person objects) to a stored procedure using spring ? Thanks in advance

39. Stored Procedure returning cursor    forum.springsource.org

Hi, My stored procedure returns a cursor that has several records.How can i extract the rows from the cursor?Can i get an example on this case... Thanks in advance Suresh

40. Oracle array from stored procedure    forum.springsource.org

Oracle array from stored procedure Hello, I am new to Spring, so I have what I hope is a basic question. I've tried the search function and reading 22 pages of ...

41. StoredProcedure declareParameter limitation ?    forum.springsource.org

Looks like those clever Spring guys have thought of everything. The code below should explain it, create a calendar, set the time, use this as the inParam. Code: declareParameter(new SqlParameter(InputFieldNames.P_TS, Types.TIMESTAMP)); ...

42. StoredProcedure doesnt make commit    forum.springsource.org

StoredProcedure doesnt make commit Hi I have a class that extends StoredProcedure, and it appears to be working, but the thing is that the procedure doesnt make commit, i.e., after the ...

43. Nothing but stored procedures    forum.springsource.org

Nothing but stored procedures I've been developing an Adobe Flex/J2EE web app for the last 2 years...it was originally designed using EJBs and the head tech guy is hot for stored ...

44. How can i pass arraylist to stored procedure    forum.springsource.org

Haven't worked much with stored procedure but since you passing parameters as a map, you can simply get the values from the array and place them inside the map used by ...

45. how to extract two result set from StoredProcedure using StoredProcedure class in Spr    forum.springsource.org

how to extract two result set from StoredProcedure using StoredProcedure class in Spr Hi Can anyone tell me how to extract two resultsets from StoredProcedure class in Spring. declareParameter(new SqlReturnResultSet("ResChkSPBPAYDT", new ...

46. Stored Procedure returning Boolean    forum.springsource.org

Are you really sure that it is a boolean that is being returned from the stored procedure? Some databases have no notion of the Boolean datatype but simply use a Int ...

47. Pass arrays to stored procedures using Ibatis    forum.springsource.org

Hi: Is there is a way to pass in arrays to Oracle stored procs in Ibatis. I have to make a bunch of inserts in a go, in a bunch of ...

48. calling stored proc from MS SQL Server 2000    forum.springsource.org

Feb 19th, 2007, 08:25 PM #1 vivekmisra View Profile View Forum Posts Private Message Junior Member Join Date Feb 2007 Posts 8 calling stored proc from MS SQL Server 2000 Hi ...

49. storedprocedure    forum.springsource.org

storedprocedure Hi, my class extends StoredProcedure and calls two storedprocedures void function1(){ setSql(PROC_NAME_1); declareParameter(new SqlInOutParameter("var",Types.VARCHAR)); compile(); Map out = executeVerifyUser("user");} void function2(){ setSql(PROC_NAME_2); declareParameter(new SqlInOutParameter("var",Types.VARCHAR)); compile(); Map out = executeVerifyUser("user");} public ...

50. Calling Stored procedure    forum.springsource.org

Hi, I am new to spring framework (just 1 week)and i need to call stored procedures from my class, but because of compile() method it doesn't allow me to call multiple ...

51. Problem while calling stored procedure    forum.springsource.org

You've already asked this question once, to which people have responsed. You really don't need to re-post this.................. http://forum.springframework.org/showthread.php?t=35448

52. Possible approach to stored procedure?    forum.springsource.org

Possible approach to stored procedure? I need help determining the effort to modify a Java app so that it no longer uses Oracle views, but stored procedures. I've included a code ...

53. stored procedure support    forum.springsource.org

Hi, I've seen (in the "Spring in Action" book) an example of using CallableStatementCallback to execute a stored procedure using Spring's JDBC support. This example executes a stored procedure which updates ...

54. Is a stored procedure the solution?    forum.springsource.org

Is a stored procedure the solution? I'm new to spring/hibernate and confused. I want to construct a bean (Treatment). Each time its created the following must happen: 1. Select a row ...

55. Oracle ROWTYPE in a Stored Procedure    forum.springsource.org

Oracle ROWTYPE in a Stored Procedure Hi there, Been lurking for the last two weeks while getting to grips with Spring. This is my first query. Spring 2.0.3 in Weblogic 8.1 ...

56. Passing a NULL value to an Stored Procedure    forum.springsource.org

Mar 20th, 2007, 06:08 PM #1 cousin_borat View Profile View Forum Posts Private Message Junior Member Join Date Feb 2007 Location Ireland and Boston Posts 14 Passing a NULL value to ...

57. Passing array to/from stored procedure    forum.springsource.org

Apr 2nd, 2007, 05:30 AM #1 bmazic View Profile View Forum Posts Private Message Junior Member Join Date Mar 2007 Posts 2 Passing array to/from stored procedure I am trying to ...

58. StoredProcedure with multiple result sets    forum.springsource.org

StoredProcedure with multiple result sets Hello, I am a newbie to Spring Framework. I just begin to use Spring Framework for my new project. In my project, I am using MSSQL ...

59. Stored Procedures -    forum.springsource.org

Stored Procedures - I am trying to do a Generic Class that handle Oracle stored procedures and functions - my class extends StoredProcedure spring class if there is not a SqlOutParameter ...

60. ClassCast Exception Weblogic 8.1, Oracle 9.2 and StoredProcedure    forum.springsource.org

ClassCast Exception Weblogic 8.1, Oracle 9.2 and StoredProcedure Hi, I am working with Weblogic 8.1 SP4 and Oracle 9.2. I connect my application database via a Datasource that access a Weblogic ...

61. Spring Storedprocedure results to database    forum.springsource.org

Spring Storedprocedure results to database Hi I've written code to call a stored procedure using spring public Map execute(String lName, String fName,String dob) { Map in = new HashMap(); in.put("surname", lName); ...

62. Using StoredProcedure class with an Oracle REF CURSOR OUT Parameter    forum.springsource.org

Using StoredProcedure class with an Oracle REF CURSOR OUT Parameter I am getting a resultset back from a call to an Oracle stored procedure with a REF CURSOR out parameter and ...

63. Storedprocedure exception    forum.springsource.org

Hi I am trying to execute a storedprocedure using execute(map). its giving me following problem. Using Sybase as backend. JdbcTemplate:SQLWarning ignored: SQL state '01ZZZ', error code '266', message [Transaction count after ...

64. StoredProcedure and optional inputs    forum.springsource.org

StoredProcedure and optional inputs Hi, Extending StoredProcedure is working great. public SampleStoredProcedure(DataSource dataSource, String sprocName) { super(dataSource, sprocName); declareParameter(new SqlReturnResultSet("rs", new EventMapper())); declareParameter(new SqlParameter("EventTitle", Types.VARCHAR)); declareParameter(new SqlParameter("EventType", Types.VARCHAR)); declareParameter(new SqlParameter("StartDate", ...

65. Return values from stored procedures    forum.springsource.org

I am user the Spring class StoredProcedure to execute Sybase stored procs. I have no problem accessing result sets or output parameters. However, it is not clear from the documentation how ...

66. Stored Procedure and oracle.xdb.XMLType    forum.springsource.org

Stored Procedure and oracle.xdb.XMLType Using Spring's support for stored procedures, how can I specify a parameter of type oracle.xdb.XMLType? Currently, the constructor of my subclass of org.springframework.jdbc.object.StoredProcedure contains statements like the ...

67. handling xml results from storedprocedure    forum.springsource.org

hi I need to call a stored procedure and the results I'm expecting in xml format. How do i persisit these xmlresults ,can somebody put me in right direction?or may be ...

68. Calling AS400 Stored Procedure from Java using Spring    forum.springsource.org

Hi, I need to call an AS400(DB400) stored procedure from my web application which is using Spring and Struts. Please help me with sample codes on how to do this. Also ...

69. configuring Stored Procedure    forum.springsource.org

This is purely for the examples. You can configure your dataSource in the applicationContext.xml and inject it. You can also extract your properties out to a file and use PropertyPlaceholderConfigurer to ...

70. Stored Procedure in spring    forum.springsource.org

71. Exception in spring - oracle stored procedure.    forum.springsource.org

Exception in spring - oracle stored procedure. Hi all, I am using Stored Procedure in spring. When accessing that procedure the following error will occur. My out put parameter in Stored ...

72. Stored Procedure with multiple RefCursor outParameters    forum.springsource.org

Stored Procedure with multiple RefCursor outParameters Hi I have a Stored Procedure that returns 4 RefCursors, and I get this error when calling it. Code: org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL ...

73. StoredProcedure/Oracle Cursor    forum.springsource.org

StoredProcedure/Oracle Cursor Hi All, Here is what I am trying to accomplish -- I have a stored procedure that takes in two inputs, returns an Oracle cursor. From the result set, ...

74. Stored Procedure Parameters Problem    forum.springsource.org

Stored Procedure Parameters Problem Hi, I run stored procedures defined in external sql files. The stored procedures are written in the form of call ABCD.proc(?, ?) Since the types and the ...

75. passing parameter to stored procedure    forum.springsource.org

You can access the paramaters in the CallableStatementCallback just as you would using plain JDBC. Here is an example: Code: new CallableStatementCallback() { public Object doInCallableStatement(CallableStatement cs) throws SQLException, DataAccessException { ...

76. Stored procedure call    forum.springsource.org

Stored procedure call Hi everyone, I'm pretty new to the springframework. I need some help to make a call to a stored procedure that uses an array of structures. I have ...

77. Stateful stored procedure calls    forum.springsource.org

I need to call two stored procedures on an AS/400. They are stateful, i.e. the 2nd relies on the 1st having been called with the same connection. Each stored procedure call ...

78. Empty strings when passing a Java object to a Stored Procedure    forum.springsource.org

Empty strings when passing a Java object to a Stored Procedure Hi, I'm using the interface SQLData to pass Java objects to StoredProcedures. All the object's attributes 'arrive' to the Stored ...

79. Calling stored procedure with IN OUT params    forum.springsource.org

Hi, I don't have problem calling stored procedure with OUT parameters provided that its name is given. However I have situation (I can't change it now) where I need to call ...

80. stored procedure - results are not commited    forum.springsource.org

stored procedure - results are not commited Hi, I have a MySql stored procedure which I am running from spring by use of a class that extends StoredProcedure. The stored procedure ...

81. StoredProcedure caching call string    forum.springsource.org

StoredProcedure caching call string Hi, I am using springs facility to manage a stored procedure. Recently, my dba added an additional parameter required for the stored procedure to execute. This makes ...

82. StoredProcedure Assistance    forum.springsource.org

StoredProcedure Assistance Hello, I am converting a JDBC app to a Spring JDBCTemplate application. I am trying to mimic the following that used to use a CallableStatement. "BEGIN ? := xx.somefunction.dosomething(?, ...

83. Stored procedure quesyion    forum.springsource.org

Stored procedure quesyion Had a question regarding how spring's stored procedure class handles database connections .. when we create a stored procedure, we do the following things. - set the datasource ...

84. Problem with an Oracle stored procedure    forum.springsource.org

Problem with an Oracle stored procedure Hello I'm having some problems with a stored procedure and the results its giving me, hopefully someone can help. I have a function, my_package.my_function, which ...

85. ClassCastException when calling Stored Procedure on Oracle 9i    forum.springsource.org

ClassCastException when calling Stored Procedure on Oracle 9i Hello, I'm trying to use the 'StoredProcedure' Spring class to call a procedure on an oracle 9i Database. It all succeeds when the ...

86. StoredProcedure call    forum.springsource.org

hi, i want to call a stored procedure. but i have had this exception : Code: org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar [{call TC_CHEC(?, ?, ?, ?, ?)}]; nested exception is java.sql.SQLException: ...

87. fail to call function from StoredProcedure    forum.springsource.org

fail to call function from StoredProcedure I use StoredProcedure to call a function in Oracle. the code is: protected class VehicleHubboStoredProcedure extends StoredProcedure{ // protected VehicleHubboStoredProcedure(DataSource ds ){ super(ds, "ECUSTOMER.ORIX_ECUSTOMER.ORIX_HAS_HUBBO"); setFunction(true); ...

88. How Can You Create Oracle StructDescriptor When Subtyping Spring StoredProcedure?    forum.springsource.org

How Can You Create Oracle StructDescriptor When Subtyping Spring StoredProcedure? In order to pass an Oracle stored procedure one of the custom Oracle sql parameters such as an Oracle VARRAY from ...

89. Deleting fields using stored procedure    forum.springsource.org

Deleting fields using stored procedure Hi, I'm having a problem regarding deletion of fields. I am using a stored procedure for deletion. Here's the error I get: javax.servlet.ServletException: Neither Errors instance ...

90. execute methods of StoredProcedure    forum.springsource.org

Hello! Could u tell me why execute methods of Stored Procedure are public? I think that they should be protected, because they should be used only by subclasses. Also subclass cannot ...

91. SPRING + ORACLE INTEGRATION( java stored procedures)    forum.springsource.org

Hello, I was wondering if any of you were able to use Spring Framework from Oracle Java Stored Procedure. I need to create an oracle stored procedure based on Java code ...

92. Executing Stored procedure without out parameter    forum.springsource.org

I have a stored procedure which has one input parameter and no out parameter. The procedure has the follwoing line. Here @ID is the input parameter. select @TEXT = SHORT_TEXT from ...

93. Stored Procedure invocation - CLosed connection - Pls help    forum.springsource.org

Stored Procedure invocation - CLosed connection - Pls help Hello, I want to invoke a Stored procedure which returns an Oracle Object Type definition...I have followed all the necessary instructions including ...

94. Problem with calling a stored procedure / function    forum.springsource.org

Problem with calling a stored procedure / function Hi ! I've to call a stored procedure / function a little bit strange inside a package. I use SimpleJdbcCall with Spring 2.5.1 ...

95. Releasing connection when calling a StoredProcedure instance    forum.springsource.org

Releasing connection when calling a StoredProcedure instance Hi, Can someone explain to me when the connection get closed? I wrote a very simple example of an Oracle function called via the ...

96. How to obtain an Oracle XmlType from a stored procedure ?    forum.springsource.org

How to obtain an Oracle XmlType from a stored procedure ? Dear all, I found in this thread http://forum.springframework.org/showthread.php?t=39787 how to set up an input parameter of XmlType for a stored ...

97. Problem with Spring Stored Procedure class    forum.springsource.org

Problem with Spring Stored Procedure class I have had a problem with the execute method in a subclass of Spring's StoredProcedure class. When it gets to the execute method, it gets ...

98. Using Stored Procedures    forum.springsource.org

Using Stored Procedures Hi All - We use Spring JDBC in our project and almost all the DB activity like inserts/update/delete and selects have been done using the Stored procedures (SP) ...

99. Storedprocedure with jdbcTemplate    forum.springsource.org

Storedprocedure with jdbcTemplate Hi im having problem of using jdbcTemplate to execute my storedprocedures. I try impl the StoredProcedure that spring provides, but with no luck. The problems seems that jdbcTemplate ...

100. a reusable class for stored procedures    forum.springsource.org

I want to create a reusable class by extending the StoredProcedure class. My expectation is that one result set will be returned by passing a table name to a stored procedure, ...