Reply to Re: SQL server 2005 Express - Vista - Invalid object name '#spdbdesc'

Your name:

Reply:


Posted by Dan Guzman on 04/02/07 12:39

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@hotmail.co.uk> wrote in message
news:1175515801.437239.111860@b75g2000hsg.googlegroups.com...
> 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?
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация