Solved

cannot find table 0

Posted on 2006-06-19
1
255 Views
Last Modified: 2008-03-10
i have no clue why this is happening.  I am getting the error "Cannot Find Table 0"

stored procedure
----------------------------------------------------------------------
CREATE PROCEDURE GetImageURLfromImageIDforSource
(@Image1ID int,
@Image2ID int,
@Image3ID int,
@Image4ID int,
@Image5ID int,
@Image6ID int,
@Image7ID int,
@Image8ID int)
AS

Select ImageID, URL
From [Image]
Where ImageID = @Image1ID OR ImageID = @Image2ID OR ImageID = @Image3ID OR ImageID = @Image4ID OR ImageID = @Image5ID OR ImageID = @Image6ID OR ImageID = @Image7ID OR ImageID = @Image8ID

Return
GO
---------------------------------------------------------------------------


.aspx.vb file
--------------------------------------------------------------------------
Public Function getImages()

        Dim connection As New SqlConnection(connectionString)

        Try
            connection.Open()
            Dim command As New SqlCommand("GetImageURLfromImageIDforSource", connection)
            command.CommandType = CommandType.StoredProcedure

            command.Parameters.Add("@Image1ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image1ID").Value = Pic1IDTextBox.Text
            command.Parameters.Add("@Image2ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image2ID").Value = Pic2IDTextBox.Text
            command.Parameters.Add("@Image3ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image3ID").Value = Pic3IDTextBox.Text
            command.Parameters.Add("@Image4ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image4ID").Value = Pic4IDTextBox.Text
            command.Parameters.Add("@Image5ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image5ID").Value = Pic5IDTextBox.Text
            command.Parameters.Add("@Image6ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image6ID").Value = Pic6IDTextBox.Text
            command.Parameters.Add("@Image7ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image7ID").Value = Pic7IDTextBox.Text
            command.Parameters.Add("@Image8ID", SqlDbType.Int, 4)
            command.Parameters.Item("@Image8ID").Value = Pic8IDTextBox.Text
           
            Dim adapter As New SqlDataAdapter(command)
            adapter.Fill(ImageDataSet, "Image")

        Catch e As Exception

        Finally
            connection.Close()
        End Try

    End Function
-----------------------------------------------------------------------
0
Comment
Question by:attipa
1 Comment
 
LVL 3

Accepted Solution

by:
meomar earned 500 total points
Comment Utility
Try changing the

From [Image]

to

From Image

and see what hapens.  Also where did you define your Dataset I do not see it defined any where ?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

12 Experts available now in Live!

Get 1:1 Help Now