Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 11th, 2004, 07:56 AM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Could not find stored procedure

Please help

When i try to open ThePhileVB in the browser window i get the following message

Could not find stored procedure 'sp_Polls_GetCurrentQuestionID'

please help becasue it is driving me mad




  #2 (permalink)  
Old April 12th, 2004, 12:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's in the database backup file in the code download. You need to restore this to create all of the objects.

CREATE PROCEDURE sp_Polls_GetCurrentQuestionID
@QuestionID int OUTPUT
AS

SELECT @QuestionID = QuestionID
    FROM Polls_Questions
    WHERE IsCurrentQuestion = 1 AND Archived = 0

IF @QuestionID IS NULL
    SET @QuestionID = -1
GO
  #3 (permalink)  
Old June 4th, 2004, 07:27 AM
Authorized User
 
Join Date: Apr 2004
Location: glasgow, , United Kingdom.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the procedure in my project but get the same message?
I'll try restoring from the code download anyway
  #4 (permalink)  
Old June 4th, 2004, 08:58 AM
Authorized User
 
Join Date: Apr 2004
Location: glasgow, , United Kingdom.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

tried this no difference. Must be something obvious I'm
missing? Should've bought a book with the samples on a CD. :(
  #5 (permalink)  
Old June 5th, 2004, 07:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You must not have restored the database from the backup file named "thephile-database-backup" dated 1/17/2003. I restored my DB from that file and I got the SP I showed you, along with the others.
  You will NOT get it by rebuilding your database from the script named ThePhile.sql. The script was not updated when the DB backup file was updated. This is why a code download is better than a CDROM - a CDROM can't be updated after the book ships.

Eric
  #6 (permalink)  
Old June 5th, 2004, 07:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Johno,

See my posting in the thread "SQL Server does not exist or access denied". Maybe you don't have a proper user account that has permission to access the objects. Create your own user like my message explains, then use that user in your connection string.

Eric
  #7 (permalink)  
Old June 6th, 2004, 08:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

Is the proc owned by dbo? If not, you'll have to prefix the stored procedure name in code with the owner name.

Brian
  #8 (permalink)  
Old August 19th, 2004, 01:33 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to seanmayhew
Default

Im having this same problem I've added the ASPNET account to SQL Server and gave it access to the database. I also went into the permissions of the ASPNET login on the database itself and see nothing but empty checkboxes so I check the one relevant to this stored procedure and still get the error. Any help would be greatly appreciated.
  #9 (permalink)  
Old August 19th, 2004, 10:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does the error say "Could not find stored procedure 'sp_Polls_GetCurrentQuestionID'"?
Go into Enterpise Manager, drill down to ThePhile database, open the Stored Procedures node, and try to find this procedure. If you find it, right click on it and select properties. You should see the text I posted in an earlier message.

If you don't see the procedure in Enterpise Manager, it's because you didn't restore from the database backup file, like I also described in a previous message.

Eric
  #10 (permalink)  
Old August 20th, 2004, 06:57 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to seanmayhew
Default

I restored from the most recent version of the code download thephile-backup and the stored procedure is there
 


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
Stored Procedure Help. midway11 SQL Language 3 November 20th, 2006 05:36 AM
Can't find a Procedure? ChengWei BOOK: ASP.NET Website Programming Problem-Design-Solution 8 October 31st, 2006 09:31 PM
Stored Procedure Help BukovanJ SQL Language 2 October 10th, 2006 08:02 AM
Could Not find stored Procedure kavyach BOOK: ASP.NET Website Programming Problem-Design-Solution 1 June 10th, 2005 06:53 AM
Could not find stored procedure 'sp_Polls_GetCurre jblp BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 18th, 2003 06:10 AM



All times are GMT -4. The time now is 05:50 AM.


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