ASP Free Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherASP Free Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 1st, 2004, 07:40 AM
Coyney Coyney is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 3 Coyney User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 8 sec
Reputation Power: 0
Smile Stored procedure problems

I do not know if this is the right fourm but I'll try any way. I am trying to make an asp web page that will have a box that will have a list box with town names in it. I want the user to be able to pick a town and have all the records for that town to appear on the page. I have tried to do this using a query but the results were all wrong. I created the following stored procedure and it gave me the results I wanted. The only problem is, I do not know how to this stored procedure in to one that can get the town name from the list box on the web page.
CREATE PROCEDURE dbo.untitled
AS
SELECT *
From dbo.project INNER JOIN
dbo.organisation ON dbo.project.orgref = dbo.organisation.orgref
Order by dbo.organisation.town
GO

Any help would be great.

Thanks!

Reply With Quote
  #2  
Old September 1st, 2004, 09:23 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
Quote:
Originally Posted by Coyney
The only problem is, I do not know how to this stored procedure in to one that can get the town name from the list box on the web page.

1) ASP Free Lounge is a chit chat area.
2) This would be better answered in the Microsoft SQL Server area or SQL Development area.
3) I don't understand your question? Are you wanting to know how to pass the selected town name to the stored procedure?

Reply With Quote
  #3  
Old September 1st, 2004, 11:42 AM
Coyney Coyney is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 3 Coyney User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 8 sec
Reputation Power: 0
I have tried going to the developer sites and the answers they give are way over my head. I am very new to all this and thought that this kind of site might be a bit lighter and tone and would be able to tell me some things I understand. I also was not sure if I had to do some thing in the asp page or in sql to make it work. Yes I want to pass the selected town name to the stored procedure.

Reply With Quote
  #4  
Old September 1st, 2004, 11:45 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
Code:
CREATE PROCEDURE dbo.untitled
   @TownName As varchar(50)
AS
SELECT *
From dbo.project As A
INNER JOIN dbo.organisation As B ON (A.orgref = B.orgref)
WHERE B.town = @TownName
GO

Reply With Quote
  #5  
Old September 2nd, 2004, 04:24 AM
Coyney Coyney is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 3 Coyney User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 8 sec
Reputation Power: 0
Smile Thank you!

It works great I put it in messed about on dreamweaver for a bit and it worked first time.

Thank you!

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherASP Free Lounge > Stored procedure problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT