.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 27th, 2012, 04:08 AM
Big Heart Big Heart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 1 Big Heart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 39 sec
Reputation Power: 0
How to fetch sql column in message box unsin LINQ in C#

can any one help me in one process..i want to display idcount in message box.
my stored procedure
ALTER PROCEDURE [dbo].[Transaction]
(

@Patient nvarchar(50),
@E_TO nvarchar(50),
@R_type int,
@User_id uniqueidentifier,
@ReportType nvarchar(50),
@Patient_no int,
@Patient_ID_NO numeric(18,0),
@idcount int output

)
AS
BEGIN

declare @tempid int
set @tempid = 0;
declare @idcnt int
select @idcnt =isnull( max(idcount),0) from Transactions where year(R_date)=year(getdate())
if (@idcnt =0)
set @tempid=1
else
set @tempid = @idcnt +1


INSERT INTO dbo.Transactions (Patient,E_TO,R_date,R_from,User_id,report_type,Patient_no,Patient_ID_NO,idcount)values (@Patient,@E_TO,getdate(),@R_type,@User_id,@ReportType,@Patient_no,@Patient_ID_NO,@tempid)
return @idcount
END

these line of code i am using for fetching the the column , but its displaying -1 only , i am using linq to sql.


int? idcount = -1;

try
{

var q = db.Transaction(Patient_name, Export_TO,replay_To_type,null,repType,PatNoVal,PatID,ref idcount);

}

ClientScript.RegisterStartupScript(this.GetType(), "Message", "alert('Your ID is :" + idcount + "');", true);

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > How to fetch sql column in message box unsin LINQ in C#

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap