I've looked all over for some help on this and can't find anything useful. I am building a web application using JSP with a SQL Server 2005 DB. I've created a stored procedure on the SQL server called "usp_q_IDnumberSearch". Here is the SP:
@IDnumber varchar(10),
@RowStart varchar(10),
@RowEnd varchar(10)
AS
BEGIN
SET NOCOUNT ON;
WITH PagingRecords
AS
(
SELECT IDnumber, last_name, first_name,date_of_birth,cob, coc, ROW_NUMBER() OVER(ORDER BY last_name) AS RowNumber
FROM dbo.PERSON
Where a_number=@Anumber
)
SELECT IDnumber, last_name, first_name,date_of_birth,cob, coc
FROM PagingRecords
WHERE RowNumber BETWEEN @RowStart AND @RowEnd
END
Now, I need the JSP application to run this SP passing the parameters @IDnumber, @RowStart, @RowEnd and display the results in the application. I also need the Next button and Back button on the results page to update the RowStart and RowEnd parameters. Do I need a Set statement?
Does anyone know how to do this in JSP? It seems to me that it should be easy, but all of the information I come across is for ASP.