Click here to Skip to main content
15,895,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: REfresging Form While process is running Pin
MumbleB10-Jun-08 5:44
MumbleB10-Jun-08 5:44 
GeneralRe: REfresging Form While process is running [modified] Pin
Giorgi Dalakishvili10-Jun-08 6:03
mentorGiorgi Dalakishvili10-Jun-08 6:03 
GeneralRe: REfresging Form While process is running Pin
MumbleB10-Jun-08 7:07
MumbleB10-Jun-08 7:07 
GeneralRe: REfresging Form While process is running Pin
Giorgi Dalakishvili10-Jun-08 7:35
mentorGiorgi Dalakishvili10-Jun-08 7:35 
QuestionSplash Screen Form Pin
see_seA9-Jun-08 23:57
see_seA9-Jun-08 23:57 
AnswerRe: Splash Screen Form Pin
leppie10-Jun-08 23:46
leppie10-Jun-08 23:46 
GeneralRe: Splash Screen Form Pin
see_seA11-Jun-08 0:02
see_seA11-Jun-08 0:02 
Questionproblem with output parameter Pin
Mr.Kode9-Jun-08 23:50
Mr.Kode9-Jun-08 23:50 
i have stored procedure with two parameters as follows:
create procedure checkCompatability
(
@compatility varchar output,
@award_num int
)
AS
SET NOCOUNT OFF;
IF EXISTS (SELECT Award_num from table1 where award_num=@award_num)
begin
set @compatability='Y'
print @compatability
end
else
set @compatability='N'
print @compatability
GO

in C# parameters:

SqlCommand checkDone = new SqlCommand();
checkDone.Connection = con1;
checkDone.Connection.Open();
checkDone.CommandType = CommandType.StoredProcedure;
checkDone.CommandText = "checkCompatability";

SqlParameter comp = new SqlParameter("@compatability", SqlDbType.VarChar);

string S = comp.Value.ToString();\\null reference exception occours here
lblresult.Text = S.ToString();
comp.Direction = ParameterDirection.Output;


SqlParameter complete = new SqlParameter("@award_num", SqlDbType.Int);
complete.Direction = ParameterDirection.Input;
int awN = int.Parse(comboAwardNum.Text);
complete.Value =(int) awN;


lblresult.Text = comp.Value.ToString();

checkDone.Parameters.Add(comp);
checkDone.Parameters.Add(complete);

checkDone.ExecuteNonQuery();
checkDone.Connection.Close();

what is the problem with that code?
AnswerRe: problem with output parameter Pin
Ashfield10-Jun-08 1:25
Ashfield10-Jun-08 1:25 
AnswerRe: problem with output parameter Pin
Eslam Afifi10-Jun-08 2:30
Eslam Afifi10-Jun-08 2:30 
QuestionAdding VB Code to ThisWorkbook using C# problem Pin
Yasser Sobhdel9-Jun-08 23:26
Yasser Sobhdel9-Jun-08 23:26 
QuestionByte[] type in datagrid gives error. Pin
topcatalpha9-Jun-08 23:08
topcatalpha9-Jun-08 23:08 
QuestionFetching files Pin
shriya_179-Jun-08 23:04
shriya_179-Jun-08 23:04 
AnswerRe: Fetching files Pin
Ashfield9-Jun-08 23:28
Ashfield9-Jun-08 23:28 
QuestionGet filename from windows explorer right menu? Pin
Abdul Gafoor9-Jun-08 22:39
Abdul Gafoor9-Jun-08 22:39 
AnswerRe: Get filename from windows explorer right menu? Pin
Giorgi Dalakishvili9-Jun-08 22:45
mentorGiorgi Dalakishvili9-Jun-08 22:45 
QuestionMS Office 2007 - Server Requirements Pin
newc19-Jun-08 22:30
newc19-Jun-08 22:30 
AnswerRe: MS Office 2007 - Server Requirements Pin
Mike Dimmick10-Jun-08 2:17
Mike Dimmick10-Jun-08 2:17 
GeneralRe: MS Office 2007 - Server Requirements Pin
newc110-Jun-08 4:24
newc110-Jun-08 4:24 
QuestionDiscarding Keyboard-Events for GUI Pin
J. Holzer9-Jun-08 21:59
J. Holzer9-Jun-08 21:59 
QuestionIE 7 Restart problem in Vista machine Pin
sachinkalse9-Jun-08 21:41
sachinkalse9-Jun-08 21:41 
AnswerRe: IE 7 Restart problem in Vista machine Pin
Gareth H10-Jun-08 1:06
Gareth H10-Jun-08 1:06 
GeneralRe: IE 7 Restart problem in Vista machine Pin
sachinkalse10-Jun-08 2:01
sachinkalse10-Jun-08 2:01 
AnswerRe: IE 7 Restart problem in Vista machine Pin
Mike Dimmick10-Jun-08 2:51
Mike Dimmick10-Jun-08 2:51 
QuestionHow to know When USB Detect in our GUI application Pin
pramod_1239-Jun-08 20:43
pramod_1239-Jun-08 20:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.