Solved

cannot find table 0

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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