Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: Could not find stored procedure 'False'

Status
Not open for further replies.

asmith555

Programmer
Oct 7, 2002
97
US
I get this error on the execute reader line. I am not referencing a SP so I have no idea why it keeps looking for one. PLease help.

Dim sSQL As String = sSQL = "SELECT [PostID] FROM [Posts] WHERE [ThreadID] = " & Request.QueryString("ThreadID")
Dim conn As SqlClient.SqlConnection = Session("SQLConn")
conn.Open()
Dim cmd As SqlClient.SqlCommand = New SqlClient.SqlCommand(sSQL, conn)
cmd.CommandType = CommandType.Text
Dim dr As SqlClient.SqlDataReader = cmd.ExecuteReader(CommandBehavior.Default)
DLPostRepeater.DataSource = dr
DLPostRepeater.DataBind()
conn.Close()
 
Hmmm...when you execute straight sql, it actually does get run through a stored proc within sql server that handles sql string requests.

It could be that maybe your asp.net user doesn't have proper permissions for that stored proc, and thats why you're getting the error?

D'Arcy
 
The aspnet user has admin rights and I have explicitly given access to the Master DB for aspnet and Admins. Still nothing
 
You may be giving it the wrong table name to select from?
 
I can copy and paste the SQL statement out of the trace and run it in Query Analyser and it runs fine. I have googled the web and this does not appear to be a common problem.
 
I found the problem:
First Line.
" Dim sSQL As String = sSQL = "SELECT [PostID] FROM [Posts] WHERE [ThreadID]..."

Notice the bold areas.
Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top