Solved

cannot find table 0

Posted on 2006-06-19
1
270 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
ID: 16939275
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 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

10 Experts available now in Live!

Get 1:1 Help Now