Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » SQL Server »

System.Data.SqlClient.SqlException: Invalid object name

Estas en el tema de System.Data.SqlClient.SqlException: Invalid object name en el foro de SQL Server en Foros del Web. Amigos les cuento que recien estoy entrando en el uso de Base de Datos para mi web y tengo este problema, cuando cargo la pagina ...
  #1 (permalink)  
Antiguo 01/02/2007, 05:19
 
Fecha de Ingreso: diciembre-2006
Mensajes: 6
Antigüedad: 17 años, 4 meses
Puntos: 0
System.Data.SqlClient.SqlException: Invalid object name

Amigos les cuento que recien estoy entrando en el uso de Base de Datos para mi web y tengo este problema, cuando cargo la pagina en mi web me sale:
System.Data.SqlClient.SqlException: Invalid object name 'marilyn.Mensaje'.
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaDat a()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbComman d.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.DoInit()
PUEDEN AYUDARME LOS EXPERTOS, PORQUE HE BUSCADO Y BUSCADO SOLUCIONES EN INTERNET Y NO SE QUE HACER PARA QUE PUEDA FUNCIONAR BIEN MI BASE DE DATOS. Cuando cargo la tabla sale Marilyn.Mensajes y yo veo que en otros que trabajan con BD sale dbo.Mensajes COMO PUEDO HACER
  #2 (permalink)  
Antiguo 01/02/2007, 09:51
 
Fecha de Ingreso: noviembre-2006
Ubicación: México
Mensajes: 866
Antigüedad: 17 años, 5 meses
Puntos: 8
Re: System.Data.SqlClient.SqlException: Invalid object name

Que tal Marilyn.

Lo que el mensaje de error te esta marcando es "No existe la tabla 'marilyn.Mensajes'", seguramente tienes una sentencia SQL (Query) que incluye la clausula FROM " FROM Mensajes", cambiala por " FROM dbo.Mensajes".

Si aún así sigues teniendo problemas, postea la sentencia que estas usando y asegurate que las tablas que quieres usar existan, incluidos sus campos campos.

Saludos.
  #3 (permalink)  
Antiguo 01/02/2007, 18:30
 
Fecha de Ingreso: diciembre-2006
Mensajes: 6
Antigüedad: 17 años, 4 meses
Puntos: 0
Re: System.Data.SqlClient.SqlException: Invalid object name

Agradesco por la ayuda pero igual lo modifique por dbo.Mensajes en el codigo y igual me sale que no existe, a pesar que ya verifique que la tabla existe.
Nose cual sea el problema pues probe con la conexion de la BD Northwind y jalo muy bien los datos. Pero con dbo.customs, u otras
En cambio en la mia sale para la seleccion de la tabla marilyn.Mensajes, no se porque.
  #4 (permalink)  
Antiguo 17/03/2008, 22:43
 
Fecha de Ingreso: marzo-2008
Mensajes: 3
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: System.Data.SqlClient.SqlException: Invalid object name

Fijate en el web.config si el nombre del catalogo es el de tu base de datos
Salú
Claudio
  #5 (permalink)  
Antiguo 12/07/2008, 14:22
 
Fecha de Ingreso: julio-2008
Mensajes: 3
Antigüedad: 15 años, 9 meses
Puntos: 2
Respuesta: System.Data.SqlClient.SqlException: Invalid object name

Yo lo solucione poniendo mis sentencias asi por ejemplo:

select * from [Base de datos].[Usurio].[Tabla]
select * from [DB_Prueba].[dbo].[tb_prueba]
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:48.