Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 05:19 AM
Authorized User
 
Join Date: Jan 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hossrad
Default EXECUTING A STRING (HELP PLEASE!!)

Dear friends,
i have a problem here that as much as i go through it looks worth.
I have build a dynamic query with a string like below:

CREATE PROCEDURE PROC1
AS
DECLARE @TempQString nvarchar(1000)
SET @TempQString = 'DECLARE @resultvalue int'
SET @TempQString =@TempQString + 'EXEC @resultvalue=[MyStoredProcedure]'
EXEC sp_executesql @TempQString
GO

now in the body of my main stored procedure (PROC1) i want to get the
return value if the [MyStoredProcedure] that was executed through a string!!!!!!!!!!

i've tried to insert the return value in a temp table (#table)
but this also didnt work, cuz out of the string execution my temp table was dropped!! also i cant use a global temp table (##table)
because many users may execute the PROC1 at the same time!!
PLEASE HELP THIS IS VERY IMPORTANT FOR ME

God Bless you,
Hossein
__________________
Be Sure,
-hossrad
 
Old May 15th, 2007, 07:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Why do you have to cross post if that is so urgent cross posting will not get you the response you expect. It is in a way considered as SPAM here. It is enough that it is posted at the relevant place to get the right response.

P2P Forum > SQL Server > SQL Server 2005 > EXECUTING A STRING (HELP PLEASE!!) and it has been answered there.

Cheers.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
EXECUTING A STRING (HELP PLEASE!!) hossrad SQL Server 2005 1 May 15th, 2007 06:26 AM
executing a commnad stored in a string... elladi Javascript How-To 1 December 22nd, 2004 01:52 PM
executing 2 datareaders msrnivas .NET Web Services 2 January 8th, 2004 08:15 AM
Executing from memory Knik DerMuf Beginning VB 6 4 July 10th, 2003 07:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.