Click here to Skip to main content
15,886,799 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: windows taskbar Pin
bneacetp26-Jan-05 0:59
bneacetp26-Jan-05 0:59 
QuestionHow do i Know someone really knows .NET Pin
Roddy6620-Jan-05 7:33
Roddy6620-Jan-05 7:33 
AnswerRe: How do i Know someone really knows .NET Pin
Anonymous20-Jan-05 10:23
Anonymous20-Jan-05 10:23 
GeneralRe: How do i Know someone really knows .NET Pin
Colin Angus Mackay21-Jan-05 0:08
Colin Angus Mackay21-Jan-05 0:08 
AnswerRe: How do i Know someone really knows .NET Pin
Colin Angus Mackay21-Jan-05 3:33
Colin Angus Mackay21-Jan-05 3:33 
AnswerRe: How do i Know someone really knows .NET Pin
Steven Campbell21-Jan-05 7:30
Steven Campbell21-Jan-05 7:30 
GeneralSqlDataReader fails with multiple resultsets Pin
Husein20-Jan-05 3:58
Husein20-Jan-05 3:58 
GeneralRe: SqlDataReader fails with multiple resultsets Pin
Anonymous20-Jan-05 10:31
Anonymous20-Jan-05 10:31 
from what i see, code is not wrapped in a try catch block. you also don't close the connection, and rdr.NextResult is not needed since rdr.Read() enumerates through set in a DataReader. plus ur opening the connection before ur setting cmd fields.

try this


cn = new System.Data.SqlClient.SqlConnection(ConnectionString);
SqlCommand cmd = new SqlCommand();

cmd.Connection = cn;
cmd.CommandText = "spResSupervisorSwitchboard";
cmd.CommandType = CommandType.StoredProcedure;

try{
SqlDataReader rdr = cmd.ExecuteReader();
while(rdr.Read())
{
lblWaitingFirstEntry.Text = rdr[0].ToString();
}
}catch(SqlException ex)
{
lblWaitingFirstEntry.Text = ex.ToString();
}
finally
{
con.close();
}

GeneralGetting error message "operation could not be completed' Pin
jthundiyil20-Jan-05 0:10
jthundiyil20-Jan-05 0:10 
GeneralRe: Getting error message "operation could not be completed' Pin
saadiyah24-Jan-05 8:10
saadiyah24-Jan-05 8:10 
QuestionInternational / Localized Path names? Pin
John Guin19-Jan-05 10:08
John Guin19-Jan-05 10:08 
AnswerRe: International / Localized Path names? Pin
Robert Rohde19-Jan-05 19:45
Robert Rohde19-Jan-05 19:45 
AnswerRe: International / Localized Path names? Pin
Anonymous25-Jan-05 4:34
Anonymous25-Jan-05 4:34 
GeneralProperty Grid control Pin
kstoj19-Jan-05 7:25
kstoj19-Jan-05 7:25 
QuestionWhy using Microsoft DAAB with COM+is Bad practice? Pin
AshishRawat19-Jan-05 6:11
AshishRawat19-Jan-05 6:11 
GeneralISupportInitialize Pin
Sendilkumar.M19-Jan-05 2:53
Sendilkumar.M19-Jan-05 2:53 
Generalauthorization and profile application block Pin
tigertwareg18-Jan-05 6:44
tigertwareg18-Jan-05 6:44 
GeneralReading XLS files in C#, but cell contents are truncated Pin
taz_hexland18-Jan-05 6:27
taz_hexland18-Jan-05 6:27 
GeneralRe: Reading XLS files in C#, but cell contents are truncated Pin
Rob Graham19-Jan-05 3:22
Rob Graham19-Jan-05 3:22 
Generaldll version Pin
pssuresh18-Jan-05 0:21
pssuresh18-Jan-05 0:21 
GeneralRe: dll version Pin
Mike Dimmick18-Jan-05 2:41
Mike Dimmick18-Jan-05 2:41 
GeneralThree Package and Deployment Questions... Pin
new_phoenix17-Jan-05 12:40
new_phoenix17-Jan-05 12:40 
GeneralRe: Three Package and Deployment Questions... Pin
Robert Rohde19-Jan-05 19:54
Robert Rohde19-Jan-05 19:54 
GeneralRe: Three Package and Deployment Questions... Pin
rwestgraham1-Feb-05 11:34
rwestgraham1-Feb-05 11:34 
GeneralFormatting problem in a CRichEditView Pin
Isomorphism16-Jan-05 8:41
Isomorphism16-Jan-05 8:41 

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.