Does anyone have any sort of any idea on how to deal with this problem?
This is happening again and again and not all the time but randomly anytime.

--
Regards,
Manasi Save 




On Wed, 02 Jun 2010 06:46:56 -0400, Manasi Save wrote:
Dear Venugopal,
 
Here's the Sample Java Code Which Calls stored procedure :- 
 
//get the connection to database
Connection dbConnection = getConnection();
 
//create the call for procedure
String procedureCallStmtStr = "Call XYZ()";
 
//create callable statement object
CallableStatement cs = conn.prepareCall(procedureCallStmtStr);
 
//execute the procedure
cs.execute();
 
//obtain resultset
ResultSet result = cs.getResultSet();
 
//Iterate to get the resultSet, if present
 
//commit transaction
conn.commit();
 
//close resultset, callableStatement
result.close();
cs.close();
 
But, can it be a problem if I am executing a stored procedure anywhere? Well, I am not aware of Java so really cannot debug this.
 
Thanks in advance.

--
Regards,
Manasi Save

On Tue, 1 Jun 2010 09:36:12 +0530 (IST), Venugopal Rao wrote:
Stored procedures are not executed like a query. 
They are executed thru a Call { procedure} method.
Please check the same or let us know how you are executing the Query/Calling the Procedure.
Regards,
VR Venugopal Rao


--- On Fri, 28/5/10, Manasi Save <manasi.s...@artificialmachines.com> wrote:

From: Manasi Save <manasi.s...@artificialmachines.com>
Subject: Strange behavior by MySQL Stored Procedure
To: mysql@lists.mysql.com
Date: Friday, 28 May, 2010, 5:44 PM

Dear All,
 
I have one stored procedure Which inserts data into one table.
 
But sometimes it does not insert record. This happens when I called it from java application. But If I called same query from mysql command line. It executes successfully.
 
Also I have one procedure which only retrieves data from table. and it only gives one row sometime even if there are 10 rows available in for matching condition. This too happen when I called it from Java application and if I called it from mysql command line it gives me proper result set of 10 rows.
 
I am not able to understand Is it something known for mysql? Or am I doing something wrong?

Any input will be a great help.
 
--
Thanks and Regards,
Manasi Save
 
 

Reply via email to