Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem on Microsoft SQL Server 2005

    hi there

    i'm doing a database and there is a table called product. whenever i perform the select statement.. select * from product the following error occurs:

    Msg 208, Level 16, State 1, Line 1
    Invalid object name 'Product'.

    what does it mean?

    thanks!

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,062
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Generally that error means that you have mistyped the table name in your query.

  • #3
    New Coder
    Join Date
    May 2007
    Location
    SF, CA
    Posts
    55
    Thanks
    0
    Thanked 4 Times in 4 Posts
    I believe SQL Server 2005 defaults to placing everything in the default schema dbo

    I would try

    Code:
    SELECT *
      FROM dbo.product
    semper fi...

  • #4
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,062
    Thanks
    4
    Thanked 8 Times in 8 Posts
    SQL Server 2000 Also puts them in there. If you want to find out if this is the correct table name and do not have access to Enterprise Manager or Query Analyzer then you can get all tables in the db using this code

    Code:
    <%
    Set oRs = Server.CreateObject("ADODB.Recordset")
    sSQL = "SELECT * FROM sysobjects WHERE xtype='U'"
    oRs.Open sSQL, "Your DSN Here"
    aTables = oRs.GetRows()
    oRs.Close
    Set oRS = Nothing
    For iRows = 0 To UBound(aTables,2)
    	Response.Write aTables(0,iRows) & "<br>"
    Next
    %>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •