Solved

cannot find table 0

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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