none
Invalid object name 'my table name' asp.net RRS feed

  • Question



    1. 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?

    Sunday, June 3, 2018 1:26 PM

Answers

  • Either the connectionstring is right or the connectionstring is wrong, but in either case, the table by its tablename is not there. 
    • Marked as answer by monzer ahmed Monday, June 4, 2018 7:58 AM
    Sunday, June 3, 2018 3:11 PM

All replies

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


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. profile for Sajeetharan at Stack Overflow, Q&A for professional and enthusiast programmers

    Sunday, June 3, 2018 1:30 PM
  • Either the connectionstring is right or the connectionstring is wrong, but in either case, the table by its tablename is not there. 
    • Marked as answer by monzer ahmed Monday, June 4, 2018 7:58 AM
    Sunday, June 3, 2018 3:11 PM
  • thnx guys

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

    Monday, June 4, 2018 8:01 AM