Click here to Skip to main content
15,884,986 members
Home / Discussions / Database
   

Database

 
AnswerRe: Date Between Problem Pin
Ashfield10-Jun-08 3:59
Ashfield10-Jun-08 3:59 
AnswerRe: Date Between Problem Pin
Kjetil Svendsen11-Jun-08 3:15
Kjetil Svendsen11-Jun-08 3:15 
GeneralRe: Date Between Problem Pin
Ashfield11-Jun-08 5:01
Ashfield11-Jun-08 5:01 
AnswerRe: Date Between Problem Pin
Niraj_Silver26-Jun-08 1:10
Niraj_Silver26-Jun-08 1:10 
QuestionCan't read some cells in Excel [modified] Pin
gaby1192310-Jun-08 3:28
gaby1192310-Jun-08 3:28 
AnswerRe: Can't read some cells in Excel Pin
gaby119232-Jul-08 8:05
gaby119232-Jul-08 8:05 
Questionregistering a ".mdf" file in desktop engine Pin
asdf175310-Jun-08 3:05
asdf175310-Jun-08 3:05 
Questionproblem with output parameter Pin
Mr.Kode9-Jun-08 23:54
Mr.Kode9-Jun-08 23:54 
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
Mike Dimmick10-Jun-08 0:29
Mike Dimmick10-Jun-08 0:29 
GeneralRe: problem with output parameter Pin
Mr.Kode10-Jun-08 0:53
Mr.Kode10-Jun-08 0:53 
GeneralRe: problem with output parameter Pin
Ashfield10-Jun-08 1:34
Ashfield10-Jun-08 1:34 
QuestionSQL Server Management Studios Icon is gone ? Pin
Syed Kamran ul Haq9-Jun-08 21:56
Syed Kamran ul Haq9-Jun-08 21:56 
AnswerRe: SQL Server Management Studios Icon is gone ? Pin
Ashfield10-Jun-08 1:50
Ashfield10-Jun-08 1:50 
QuestionReporting Services - Reports Pin
john349-Jun-08 6:38
john349-Jun-08 6:38 
AnswerRe: Reporting Services - Reports Pin
DerekFL9-Jun-08 6:52
DerekFL9-Jun-08 6:52 
GeneralRe: Reporting Services - Reports Pin
john349-Jun-08 22:36
john349-Jun-08 22:36 
GeneralRe: Reporting Services - Reports Pin
john3410-Jun-08 1:07
john3410-Jun-08 1:07 
QuestionFormatting XML in SQL 2005 to include version Pin
DerekFL9-Jun-08 6:23
DerekFL9-Jun-08 6:23 
QuestionThe Top n Keyword [modified] Pin
Behzad Ordubadi9-Jun-08 5:02
professionalBehzad Ordubadi9-Jun-08 5:02 
QuestionProblem with SSRS 2005 using forms authentication while integration with Web Apps Pin
Jeff_Bennet9-Jun-08 2:25
Jeff_Bennet9-Jun-08 2:25 
Questionsql image problem Pin
bapu28898-Jun-08 6:58
bapu28898-Jun-08 6:58 
AnswerRe: sql image problem Pin
Ashfield9-Jun-08 21:18
Ashfield9-Jun-08 21:18 
QuestionRe: sql image problem Pin
bapu288910-Jun-08 9:44
bapu288910-Jun-08 9:44 
QuestionSQL Server 2000 Installation Pin
Software_Guy_1237-Jun-08 21:01
Software_Guy_1237-Jun-08 21:01 
AnswerRe: SQL Server 2000 Installation Pin
Zoltan Balazs8-Jun-08 0:36
Zoltan Balazs8-Jun-08 0:36 

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.