|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
|
#2
|
||||
|
||||
|
Quote:
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? |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
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 |
|
#5
|
|||
|
|||
|
It works great I put it in messed about on dreamweaver for a bit and it worked first time.
Thank you! |
![]() |
| Viewing: ASP Free Forums > Other > ASP Free Lounge > Stored procedure problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|