Solved

cannot find table 0

Posted on 2006-06-19
1
302 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
[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
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

738 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