473,396 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Output parameter from Sproc


Hi all,
I am writing a stored procedure to query a tale using a select statement
and get those fields as output parameters...but am getting an error:
Error 141: a select statement that assigns a variable must nt be
contained with data retrieval operations...

the skeleton is as follows: any help greatly appreicated..;

CREATE Procedure sp_getvals(@id uniqueidentifier,@pId int output,@Def
varchar(100) output)

AS
BEGIN

select @pId=id,@Def=definition from tbl where id=@id

END
GO
thanks for ur time,
Ben
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
0 1251

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: anon | last post by:
Hi all, I am writing a stored procedure to query a tale using a select statement and get those fields as output parameters...but am getting an error: Error 141: a select statement that assigns a...
0
by: Stephen Witter | last post by:
I am getting the error: Parameter 4: '@IDENTITY' of type: String, the property Size has an invalid size: 0 When trying to execute a sproc with an varchar output. Here is the asp.net code: ...
11
by: Lyle Fairfield | last post by:
The stored procedure script below is an example of how looping, case statements and output parameters can be used in MS-SQL stored procedures to accomplish things for which we may have had to use...
0
by: Zach Corera | last post by:
If I want to return both a recordset to a SqlDataReader and an output parameter from a stored procedure to .Net, I must close the SqlDataReader first or the value of the output parameter is not...
3
by: Hewit | last post by:
I have a stored procedure which returns records and output parameters(SQL2K). How to call this stored procedure using ADO.Net so that I can use both results in my application. I have .Net...
4
by: Tifer | last post by:
Hello, I'm still new to the whole .Net thing and I'm having a problem with something that should be so simple -- executing a query and returning an output parameter. It's a standard "Add"...
8
by: Alec MacLean | last post by:
Hi, I'm using the DAAB Ent Lib (Jan 2006) for .NET 2.0, with VS 2005 Pro. My project is a Web app project (using the WAP add in). Background: I'm creating a survey system for our company, for...
4
by: Clint Pidlubny | last post by:
Hello, I'm using ASP.Net 2.0 and the Jan 2006 Enterprise Library. What I'm doing is passing an ArrayList into a stroed procedure to do an Insert. Here's some code: Dim params as New...
8
by: Mike P | last post by:
How do you return a datareader from a stored procedure, but also return an output parameter? Here is my code, which is just returning a data reader at the moment : _conn.Open(); SqlCommand...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.