ASP.Net Error: System.Data.SqlClient.SqlException: Invalid object name tblRSS

Last Reply 5 months ago By Mudassar

Posted 5 months ago

I have uploaded a site with database on smarterasp.net Hosting and I have created RSS page for the site but when I try to access this page this error appears:

 

Invalid object name 'tblRSS'.
Description: An unhandled exception occurred during the execution of the 
current web request. Please review the stack trace for more information 
about the error and where it originated in the code. 
Exception Details: System.Data.SqlClient.SqlException: Invalid object name ' 
tblRSS'.

Source Error: 
An unhandled exception was generated during the execution of the current web 
request. Information regarding the origin and location of the exception can 
be identified using the exception stack trace below.
Stack Trace: 
[SqlException (0x80131904): Invalid object name 'tblRSS'.]

my code is :

 

Dim dt As DataTable = New DataTable()
    Dim conn As New SqlConnection("Data Source=SQL7002.site4now.net;Initial Catalog=DB_?????????;User Id=?????????_admin;Password=???????????;")

    Using (conn)
        Dim ad As SqlDataAdapter = New SqlDataAdapter("SELECT * from tblRSS", conn)
        ad.Fill(dt)
    End Using

I'm sure the tblRSS table exists, can you help me?

Posted 5 months ago

Hi monzer,

This error means that the tblRSS table is not present in the connected database or probably the with a different schema than dbo.

So check and verify.


Posted 5 months ago

Two possiblities.

1. Table missing in the Database.

2. You are connecting to a wrong database.