• Post Reply Bookmark Topic Watch Topic
  • New Topic

what does the following error mean  RSS feed

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();
myRs = cs.getResultSet();
and my stored procedure is
CREATE PROCEDURE dbo.notificationProcedure @start int, @end int, @username varchar(255)
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
-- This is executed as long as the previous fetch succeeds.
FETCH NEXT FROM notification_cursor
set @count = @count + 1
CLOSE notification_cursor
DEALLOCATE notification_cursor
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!