Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what does the following error mean

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the following error when I get to myRs.next() in my code. can someone please explain why?
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Unexpected token type: COLINFO
CallableStatement cs = myCon.prepareCall("{call notificationProcedure (?,?,?)}");
cs.setInt(1, 11);
cs.setInt(2, 20);
cs.setString(3, "jm");
boolean success = cs.execute();
while(success)
{
myRs = cs.getResultSet();
while(myRs.next())
and my stored procedure is
CREATE PROCEDURE dbo.notificationProcedure @start int, @end int, @username varchar(255)
AS
DECLARE notification_cursor SCROLL CURSOR FOR
SELECT * FROM notification
WHERE username = @username
OPEN notification_cursor
-- Perform the first fetch.
FETCH ABSOLUTE @start FROM notification_cursor
DECLARE @count int
SET @count = @start
-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
WHILE @@FETCH_STATUS = 0 AND @count <= @end
BEGIN
-- This is executed as long as the previous fetch succeeds.
FETCH NEXT FROM notification_cursor
set @count = @count + 1
END
CLOSE notification_cursor
DEALLOCATE notification_cursor
GO
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic