Re: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 02 Apr 2007 12:39:12 GMT
This question was also posted and answered in microsoft.public.sqlserver.programming. If you need to post the same question to multiple groups, post the message once to all groups in order to avoid duplication of effort.
However, my application executes the stored procedure "sp_helpdb"
which fails with "Invalid object name '#spdbdesc'" error.
Perhaps the application is retrieving result set meta-data with SET FMTONLY
ON. This will result in an error since the #spdbdesc temp table does not
exist when the proc is executed with SET FMTONLY ON.
I'm programming in .NET C# CLR2.0, any body know what's going wrong?
It's difficult to say without seeing your code. The snippet below works for
me with SQL Server Developer Edition under Vista. I would expect it to work
under SQL Express too.
DataTable dt = new DataTable();
SqlConnection connection =
new SqlConnection("Data Source=(local);Integrated Security=SSPI");
SqlCommand command =
new SqlCommand("sp_helpdb", connection);
command.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(command);
connection.Open();
da.Fill(dt);
connection.Close();
--
Hope this helps.
Dan Guzman
SQL Server MVP
<ianforgroupuse@xxxxxxxxxxxxx> wrote in message news:1175515801.437239.111860@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm running Vista Business edition on 2005 Virtual PC.
Installed SQL Server 2005 Express latest download, with instance of
MSSQLSERVER and service accounts running under "NT AUTHORITY\SYSTEM".
Mixed mode authentication specified and sa password specified.
Used server manager to create user login with sysadmin role.
Login using windows authentication.
Run my application and database is created and populated with default
records.
However, my application executes the stored procedure "sp_helpdb"
which fails with "Invalid object name '#spdbdesc'" error.
If I run a query in server manager to execute same procedure logged
in
as the same person it runs ok and returns a table of information.
All this was working ok on XP with MSDE2000A previously.
I'm programming in .NET C# CLR2.0, any body know what's going wrong?
.
- Follow-Ups:
- Re: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- From: ianforgroupuse
- Re: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- References:
- SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- From: ianforgroupuse
- SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- Prev by Date: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- Next by Date: Re: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- Previous by thread: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- Next by thread: Re: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'
- Index(es):
Relevant Pages
|