Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2005, 09:49 PM
Registered User
 
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default please help me with this stored procedure

gud day to all!!

i have a project that i'm working on right now. it asks me to make a stored procedure that will retrieve all the data that fall on the specified filter. we will make a page on .NET and it will have sa filtering section wherein the user will enter any of the following filters (Personnel Number, Last NAme, Release Date, and Status.) and if he clicks the search button, a table will be displayed met by the specified filters that the user used. the user can use any combination of the filters in searching,but if he types in the Personnel Number textbox, all other textboxes will be disabled and will only search that particular Personel Number. even if the user inputs in all the textboxes, the Personnel number will be used in searching.

furthermore, if the user clicks the view all button, all data will be retrieved even if he enters values in the textboxes. the table will have a next & previous button because the table will ony display 10 records per page.

the Stored procedure will have an input parameter (@chvParameter = OptioneeID~LastNAme~ReleaseDate~Status), which i will parse then i have output parameters (start, end, totalcount).

---> how will i start working on this procedure. how will i code this?

----> my problem is: if 3 consecutive values in @chvParameter is empty, there will be an error like:"Invalid length parameter passed to the substring function."

---> another problem is, how will i code the part of the procedure (the displaying of 10 records per page)????


please help me with this one, thanks everyone!!!

 
Old June 10th, 2005, 12:09 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

   First of all you return your results as a set of data,not in output parameters. OutPut parameters are used for returning non set items,such as, last record ID inserted etc.
   As far as paging, there are 2 ways of doing it. One is to code it in the stored procedure, the second way is to let the datagrid in ASP.NET handle it. There are many articles out there that show both. Here is a good article that describes custome paging and how to do it.

http://www.dotnetjunkies.com/Tutoria...B871F967F.dcik







Similar Threads
Thread Thread Starter Forum Replies Last Post
stored procedure prashant_telkar SQL Server 2000 1 July 9th, 2007 07:57 AM
Stored Procedure jezywrap SQL Server ASP 1 January 3rd, 2007 12:29 AM
stored procedure kdm260 SQL Server 2000 2 June 19th, 2006 04:45 PM
Stored Procedure rajanikrishna SQL Server 2000 0 July 18th, 2005 05:01 AM
Help About Stored Procedure zhuge6 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 May 20th, 2005 09:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.