Invalid object name 'my table name'

Category: c# general


monzer ahmed on Sun, 03 Jun 2018 13:26:55

  1. I have uploaded a site with database on 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 ' 
    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;Initial Catalog=DB_?????????;User Id=?????????_admin;Password=???????????;")
        Using (conn)
            Dim ad As SqlDataAdapter = New SqlDataAdapter("SELECT * from tblRSS", conn)
        End Using

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


Sajeetharan s on Sun, 03 Jun 2018 13:30:52

Check if your connection string is correct. Also try to use the full annotation including databasename.tblRSS

DA924x on Sun, 03 Jun 2018 15:11:54

Either the connectionstring is right or the connectionstring is wrong, but in either case, the table by its tablename is not there. 

monzer ahmed on Mon, 04 Jun 2018 08:01:52

thnx guys

The problem solved after reloading the database via the site rather than  FTP