Trying to executeStoredProcedure on VFP
Posted: Fri Sep 14, 2012 7:51 pm
Hey all you VFP users out there...
Do you have any idea why I'm getting this error with the parameters or the sql types set in the executeStoredProcedure ?
--
CUID error: com.servoy.j2db.persistence.RepositoryException:com.servoy.j2db.persistence.RepositoryException:org.apache.commons.dbcp.SQLNestedException: Borrow callableStatement from pool failed Borrow callableStatement from pool failed
Here is the stored procedure I'm trying to access:
I thank you in advance for any enlightenment you may be able to provide...
Do you have any idea why I'm getting this error with the parameters or the sql types set in the executeStoredProcedure ?
--
CUID error: com.servoy.j2db.persistence.RepositoryException:com.servoy.j2db.persistence.RepositoryException:org.apache.commons.dbcp.SQLNestedException: Borrow callableStatement from pool failed Borrow callableStatement from pool failed
- Code: Select all
function getNewUID() {
var _dsCUID = plugins.rawSQL.executeStoredProcedure("vam_beta", "{?=vsp_am_assignuidnew()}", [java.sql.Types.VARCHAR], [1], 1);
if (_dsCUID.getException()) {
throw "CUID error: " + _dsCUID.getException();
} else if (_dsCUID.getMaxRowIndex() == 0) {
throw "Can't get new CUID value";
}
application.output("CUID: " + _dsCUID.getValue(1, 1),
LOGGINGLEVEL.DEBUG)
return _dsCUID.getValue(1, 1);
}
Here is the stored procedure I'm trying to access:
- Code: Select all
USE [comp1]
GO
/****** Object: StoredProcedure [dbo].[vsp_am_assignuidnew] Script Date: 09/14/2012 10:49:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/** ID: AM80003.01 Name: vsp_am_assignuidnew Owner: AM ScriptDate: 06/28/2010 **/
ALTER procedure [dbo].[vsp_am_assignuidnew]
@cretvalue char(15) output
as
begin
declare @lcuid char(37)
select @lcuid = newid()
select @cretvalue = left(@lcuid,8) + right(@lcuid,7)
end
I thank you in advance for any enlightenment you may be able to provide...