I'm trying to compare two data sets. Instead of having the long SQL in the jsp
file, I thought of using Stored Procedure and pass the ID of each set.
Now (that my SP finally saved), I'm trying to write the code.
Class.forName(dbcls);
con = DriverManager.getConnection(dburl);
CallableStatement call=con.prepareCall("{call my_stored_procedure(?,?");
call.setInt(1,60);
call.setInt(2,63);
ResultSet rs = call.executeQuery(); //execute stored procedure
QueryTable FinalSQL = (QueryTable)rs;
But I keep getting
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java, Compiled
Code)
at
allaire.jrun.db.jdbc.base.BaseSQLStringGenerator.generateSQL(Unknown Source)
at allaire.jrun.db.jdbc.base.BaseSQL.getVerb(Unknown Source)
at allaire.jrun.db.jdbc.base.BaseSQL.resultType(Unknown Source)
at allaire.jrun.db.jdbc.base.BaseSQL.<init>(Unknown Source)
at allaire.jrun.db.jdbc.base.BasePreparedStatement.<init>(Unknown
Source)
at allaire.jrun.db.jdbc.base.BaseCallableStatement.<init>(Unknown
Source)
etc....
my_stored_procedure:
CREATE PROCEDURE [dbo].[my_stored_procedure] AS
DECLARE @1 INT
DECLARE @2 INT
select distinct s.invid as ID1, s.Project_Title as PTitle1
from (select * from tableX where timeid=@1 ) s,
(select * from tableX where timeid=@2 ) t
where s.column1 = t.column1, etc....
Any suggestions?
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists