...

View Full Version : Problem on Microsoft SQL Server 2005



Lis716
06-22-2007, 06:39 AM
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!:)

miranda
06-22-2007, 09:08 PM
Generally that error means that you have mistyped the table name in your query.

javabits
06-22-2007, 09:49 PM
I believe SQL Server 2005 defaults to placing everything in the default schema dbo

I would try



SELECT *
FROM dbo.product


semper fi...

miranda
06-22-2007, 10:28 PM
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



<%
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
%>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum