"...compiling it so it will work for me..."
This isn't a compiliation error, it's a run time error. I am looking at the TBH database right now and the stored procedure is, in fact, there. Did you maybe delete it some how?
In any event, to recreate the sproc, double click on the ASPNET.MDF file this will open the server explorer, underneath the data connections node, expand the ASPNET.MDF file, you will see several folders: tables, stored procedures, etc. Right click on the stored procedure folder, select 'Add New Stored Procedure' and enter this code into the window
CREATE PROCEDURE dbo.tbh_Polls_GetCurrentPollID
(
@PollID int OUTPUT
)
AS
SET NOCOUNT ON
SELECT @PollID = PollID
FROM tbh_Polls
WHERE IsCurrent = 1 AND IsArchived = 0
IF @PollID IS NULL
BEGIN
SELECT @PollID = -1
END
Highlight all of the text, right click somewhere on the highlighted area, and choose "run selection" from the context menu. This will add the sproc to the database.
hth.
-Doug
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========