?
Solved

Could not find stored procedure 'False'.

Posted on 2004-09-13
11
Medium Priority
?
740 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 29

Expert Comment

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

Expert Comment

by:DotNetLover_Baan
ID: 12044002
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
ID: 12044020
oops.... typo...
but x_com has done that , already...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:OSLAdmin
ID: 12044206
that does not solve the problem unfortunatly
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12044304
somewhere you have specified stored procedure as your command type.  That is what is causing the error.  Look for any text containing storedprocedure.
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12044306
where does it error out at?
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 12044350
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 2000 total points
ID: 12044420
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
ID: 12044736
look for this somewhere in your code:

cmd.CommandType = CommandType.StoredProcedure
0
 
LVL 10

Expert Comment

by:jnhorst
ID: 12046771
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
ID: 12046783
Oops, x_com has already seen that... if it works point go to him.

John
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 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