Solved

Could not find stored procedure 'False'.

Posted on 2004-09-13
11
691 Views
Last Modified: 2008-03-10
using the following:

  Private Sub PopulateApps()

        Dim b As New BuildDetails
        Dim ds As DataSet
        Dim dvw As DataView

        ds = b.GetBuildApp(Session("ComputerID2"))
        dvw = ds.Tables(0).DefaultView()
        dvw.Sort() = "AppName"
        With ddlApps
            .DataSource = dvw
            .DataValueField = "ApplicationID"
            .DataTextField = "AppName"
        End With
        ddlApps.DataBind()

    End Sub

Function:

  Friend Function GetBuildApp(ByVal ComputerID As String) As DataSet
        Dim db As New DataAccess
        Dim cn As New SqlConnection(db.ConnectStr)
        Dim sSQL As String = "Select ca.ComputerID, a.ApplicationID, a.AppName " & _
                            "From tblComputerApplication ca " & _
                            "INNER JOIN tblApplication as a ON ca.ApplicationID=a.ApplicationID " & _
                            "Where ComputerID" = ComputerID
        Dim da As New SqlDataAdapter(sSQL, cn)
        Dim ds As New DataSet("App")
        cn.Open()
        da.Fill(ds, "App")
        cn.Close()
        Return ds
    End Function

I get the following error:

Could not find stored procedure 'False'.
0
Comment
Question by:OSLAdmin
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 29

Expert Comment

by:David H.H.Lee
Comment Utility
OSLAdmin ,
This line :  
"Where ComputerID" = ComputerID
Change to
 "Where ComputerID = " & ComputerID
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
Comment Utility
Change your SQL String

        Dim sSQL As String = "Select ca.ComputerID, a.ApplicationID, a.AppName " & _
                            "From tblComputerApplication ca " & _
                            "INNER JOIN tblApplication a ON ca.ApplicationID=a.ApplicationID " & _
                            "Where ComputerID" = ComputerID
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
Comment Utility
oops.... typo...
but x_com has done that , already...
0
 

Author Comment

by:OSLAdmin
Comment Utility
that does not solve the problem unfortunatly
0
 
LVL 17

Expert Comment

by:AerosSaga
Comment Utility
somewhere you have specified stored procedure as your command type.  That is what is causing the error.  Look for any text containing storedprocedure.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Expert Comment

by:AerosSaga
Comment Utility
where does it error out at?
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
Comment Utility
Ok do this...

  Friend Function GetBuildApp(ByVal ComputerID As String) As DataSet
        Dim db As New DataAccess
        Dim cn As New SqlConnection(db.ConnectStr)
        'Change SQL String a bit
        Dim sSQL As String = "Select ca.ComputerID, a.ApplicationID, a.AppName " & _
                            "From tblComputerApplication ca, tblApplication a WHERE ca.ApplicationID=a.ApplicationID " & _
                            "AND ComputerID=" & ComputerID
        Dim da As New SqlDataAdapter(sSQL, cn)
        da.SelectCommand.CommandType = CommandType.Text  'Add this line
        Dim ds As New DataSet("App")
        cn.Open()
        da.Fill(ds, "App")
        cn.Close()
        Return ds
    End Function
0
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
Comment Utility
OSLAdmin,
>>ByVal ComputerID As String,
Your ComputerID is string or integer type? If string type, you need to add double quoted around your id.
eg:
"Where ComputerID = ' " & ComputerID & "' " (String)
or
"Where ComputerID = " & Ctype(ComputerID,Integer) (not string)
-Others that, i cant see any error based on your existing code


0
 
LVL 17

Expert Comment

by:AerosSaga
Comment Utility
look for this somewhere in your code:

cmd.CommandType = CommandType.StoredProcedure
0
 
LVL 10

Expert Comment

by:jnhorst
Comment Utility
x_com first obervation is right, but you need to put single quotes around your computer id string.

Try:

Dim sSQL As String = "Select ca.ComputerID, a.ApplicationID, a.AppName " & _
                            "From tblComputerApplication ca " & _
                            "INNER JOIN tblApplication as a ON ca.ApplicationID=a.ApplicationID " & _
                            "Where ComputerID = '" & ComputerID & "'"

And then if this does not work, create a command with the above sql and use it to create the adapter.

Dim cmd As New SqlCommand(sSQL)
Dim da As New SqlAdapter(cmd)

John


0
 
LVL 10

Expert Comment

by:jnhorst
Comment Utility
Oops, x_com has already seen that... if it works point go to him.

John
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Zoom web page in asp.net 2 34
deploying a service to production environment 13 81
Pick image, show data 4 33
popup message 3 26
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now