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



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?


.



Relevant Pages

  • Re: Tracing user & permissions (triggers and stored p)
    ... To solve my problem I chosed to configure the SQL ... > from xp_cmdshell executes under the security context of the SQL Server ... >> sql Trigger executes a Stored Procedure passing it some variables. ...
    (microsoft.public.sqlserver.security)
  • slowing/halting stored procedure from ado.net
    ... When I execute the stored procedure from within SQL Server Management Studio ... it always executes fast, ... When the slowdown appears, restarting the application does not help. ...
    (microsoft.public.dotnet.framework.adonet)
  • SQL SERVER
    ... I have a scheduled job in sql server. ... This job is a executes a stored procedure. ...
    (microsoft.public.sqlserver.programming)
  • Setting size for a parameter for a varchar(max) field
    ... I am writing an application using VS2008 and SQL Server 2005. ... code that executes a stored procedure for a table that has a field ...
    (microsoft.public.vb.database.ado)
  • Re: Change Machine Name For Windows 2000 Server Domain
    ... post to multiple groups, it's best to crosspost instead, by posting a single ... > I just installed Windows 2000 Advanced Server, SQL Server ... > If I then go into Control Panel | System and select the ... > Netork Identification Tab, ...
    (microsoft.public.windows.server.general)