Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 13th, 2007, 06:21 AM
Registered User
 
Join Date: Dec 2007
Location: hyderabad, andhra pradesh, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to write Store Procedure For Search

Hi..
I am working With Asp.net using Vb for a Music Project.
i have the requirment for serach songs according to catagory wise(Singer,Actor,Music Director, etc)

i have code like this...

 If Not Page.IsPostBack Then
            searchword.Text = Request.QueryString("SearchWord")
            Response.Write(Request.QueryString("SearchWord"))
            Response.Write(Request.QueryString("Language"))
            Response.Write(Request.QueryString("SelectedCatego ry"))
            'Response.Write(Request.QueryString("Query"))

            Dim str As String = "select * from Music_SongDetails where Music_Clip_Id>0 and Music_Clip_Lang='" & Request.QueryString("Language") & "'"

            If Request.QueryString("SelectedCategory") = "Song" Then
                str = str & " and Music_Clip_Name like '%" & Request.QueryString("SearchWord") & "%'"
            ElseIf Request.QueryString("SelectedCategory") = "Movie" Then
                str = str & " and Music_Folder_Name='" & Request.QueryString("SearchWord") & "'"
            ElseIf Request.QueryString("SelectedCategory") = "Actor" Then
                str = str & " and Music_Clip_Actor='" & Request.QueryString("SearchWord") & "'"
            ElseIf Request.QueryString("SelectedCategory") = "Actress" Then
                str = str & " and Music_Clip_Actress='" & Request.QueryString("SearchWord") & "'"
            ElseIf Request.QueryString("SelectedCategory") = "Music Director" Then
                str = str & " and Music_Clip_MusicDir='" & Request.QueryString("SearchWord") & "'"
            ElseIf Request.QueryString("SelectedCategory") = "Singer" Then
                str = str & " and Music_Clip_Singer='" & Request.QueryString("SearchWord") & "'"
            ElseIf Request.QueryString("SelectedCategory") = "All" Then
                str = str
            End If
...........

I need to write this code using Store Procedure....

kindly help me out....

biswa pujarini
__________________
biswa pujarini
Reply With Quote
  #2 (permalink)  
Old December 24th, 2007, 09:31 AM
Registered User
 
Join Date: Dec 2007
Location: hyderabad, andhra pradesh, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx i got the answer

biswa pujarini
Reply With Quote
  #3 (permalink)  
Old January 9th, 2008, 01:02 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by biswapinky
 thanx i got the answer

biswa pujarini
hi , biswa pujarini
may i know ur solution? thanx

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Store procedure help... RinoDM SQL Server 2000 7 August 11th, 2008 07:09 PM
Store procedure help ??? RinoDM SQL Server 2000 8 May 1st, 2008 03:03 PM
Create Store Procedure ?? kumiko SQL Language 7 January 4th, 2008 01:11 AM
Store Procedure sureshyuga SQL Server 2000 0 May 18th, 2007 01:49 AM
How do I Call store procedure kau_shuk VS.NET 2002/2003 1 September 7th, 2006 08:09 PM



All times are GMT -4. The time now is 08:53 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.