473,396 Members | 2,059 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.

Problem Store Procedure in OutPut Parameter

hariharanmca
1,977 1GB
CREATE PROCEDURE sp_Insert_Prev_Date
(
@pCurDate smalldatetime,
@pFlgPrvDate integer,
@pOutDate smalldatetime output
)
as
declare @recCount integer, @recCount1 integer
begin
set @recCount = (select isnull(count(*),0) from tblTime_Setings)
If @recCount > 0
begin
If @pFlgPrvDate =1
begin
update tblPrv_Date_Setings set PrvDate= @pCurDate
set @pOutDate = @pCurDate
End
Else
Begin
set @recCount1 = (select isnull(count(*),0) from tblPrv_Date_Setings)
If @recCount1 > 0
begin
set @pOutDate = (select PrvDate from tblPrv_Date_Setings)
End
Else
Begin
insert into tblPrv_Date_Setings (PrvDate) values(@pCurDate)
set @pOutDate = @pCurDate
End
End
end
end

the Output parameter @pOutDate will not Return any Value to my frontend can any one know
Jan 24 '07 #1
1 1782
almaz
168 Expert 100+
You submitted SQL side but didn't show the code that runs this SP.
Did you set the SqlParameter.Direction of the corresponding parameter to ParameterDirection.Output?
Jan 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Vitamin | last post by:
I have written a stored procedure which will paging the recordset, and return a range of record that i need, and i write a asp code to call it however, no any return after the set objRs =...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
1
by: Hrvoje Voda | last post by:
How to get a parameter from store procedure ? Hrcko
5
by: Kevin Yu | last post by:
hi all since the DateTime can't be assign null, the min value is set to 1901 or something, if in a application design, the date field can be null, so in between the UI and the DB, the business...
1
by: Agnes | last post by:
I try to set an output parameter to get the result from store procedure, However,Do I still need to loop the reader to get result ?? Thanks a lot cmdKey.Parameters("@result").Direction =...
4
by: Rob | last post by:
Using VB.net and SQL server... I have a stored procedure that is simply returning a row count.... I know how to execute a stored procedure and add the output parameter. But how do I store...
3
by: Hrvoje Voda | last post by:
I have this code: SqlConnection conn = null; string Table=""; int rCount; conn = new
6
by: c676228 | last post by:
Hi everyone, I wrote a store procedure that fetch one row data in the database based on the parameter value I entered. After I created the store procedure, the store procedure code looks like...
12
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my...
1
by: inadsad | last post by:
Dear Group, I have a store procedure with 12 input parameter and 2 output parameters I'm wondering what's the best way to simplify the following routine. I'd like to eliminate extra line of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.