15,922,533 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Martin@eg (Top 3 by date)
Martin@eg
28-Aug-13 12:11pm
View
I really appreciate your help, but as stated, the stored procedure works fine until the returnvalue parameter is added. Here is the stored procedure header itself:
ALTER PROCEDURE [dbo].[ukgas_timesheets_disbs_update]
@p_employee_login varchar(10),
@p_start_date datetime,
--Timesheet fields
@p_ts_job_contracts varchar(220),
@p_mondays varchar(100),
@p_tuesdays varchar(100),
@p_wednesdays varchar(100),
@p_thursdays varchar(100),
@p_fridays varchar(100),
@p_saturdays varchar(100),
@p_sundays varchar(100),
@p_ts_categories varchar(140),
--Disbursement fields
@p_disb_uniques varchar(220) output,
@p_disb_actions varchar(40),
@p_disb_dates varchar(220),
@p_disb_job_contracts varchar(220),
@p_claim_values varchar(160),
@p_vat_elements varchar(160),
@p_claim_backs varchar(40),
@p_disb_categories varchar(140),
@p_details varchar(1020)
AS
I must be doing something wrong since there are no other similar questions out on the internet, but perhaps it is not a widely used facility. I did see some comment that Microsoft are trying to discourage its use, but I have used this facility for many years with no issues.
Thank you
Martin@eg
28-Aug-13 4:16am
View
I have put as the first parameter and the last and both cause the same error. Any other ideas?
Martin@eg
27-Aug-13 19:47pm
View
Tks for responding. The semicolon got added when I pasted the code in so it is not really there. I know that I do not need the @ in front of the parameter name, but it has never really been a problem.
As explained above, when I add the return value parameter, it is no longer possible to execute the command without an error. The exact line that I am adding is:
.Parameters.Add(New SqlClient.SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue))
As you can see, it does indeed specify that it is a returnvalue.
It is absolutely clear that no one else seems to have this problem after searching on google for days on end. Can you think why this doesn't work in my case?