Click here to Skip to main content
15,919,567 members
Home / Discussions / C#
   

C#

 
GeneralRe: Int32 type alias problem! Pin
Christian Graus7-Jan-07 20:24
protectorChristian Graus7-Jan-07 20:24 
GeneralRe: Int32 type alias problem! Pin
Judah Gabriel Himango8-Jan-07 5:25
sponsorJudah Gabriel Himango8-Jan-07 5:25 
GeneralRe: Int32 type alias problem! Pin
Christian Graus8-Jan-07 8:27
protectorChristian Graus8-Jan-07 8:27 
GeneralRe: Int32 type alias problem! Pin
Scott Dorman8-Jan-07 17:21
professionalScott Dorman8-Jan-07 17:21 
GeneralRe: Int32 type alias problem! Pin
CPallini7-Jan-07 21:43
mveCPallini7-Jan-07 21:43 
GeneralRe: Int32 type alias problem! Pin
leppie8-Jan-07 3:33
leppie8-Jan-07 3:33 
Questionusing SqlDataReader Pin
swjam7-Jan-07 14:22
swjam7-Jan-07 14:22 
AnswerRe: using SqlDataReader Pin
Rama Krishna Vavilala7-Jan-07 14:31
Rama Krishna Vavilala7-Jan-07 14:31 
To be safe you can do like this

using(sqlConnection1 = new SqlConnection())
{
 sqlConnection1.Open();

 using (SqlDataReader reader = mySqlQuery.ExecuteReader())
 {
 //use reader here
 }

 sqlConnection1.Close();
}


You can also do this:

 sqlConnection1.Open();

 using (SqlDataReader reader = mySqlQuery.ExecuteReader(CommandBehavior.CloseConnection))
 {
 //use reader here
 }
//No need to call sqlConnection1.Close




Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan

QuestionHow to persist datareader Pin
AndrusM7-Jan-07 12:31
AndrusM7-Jan-07 12:31 
AnswerRe: How to persist datareader Pin
Guffa7-Jan-07 14:15
Guffa7-Jan-07 14:15 
AnswerRe: How to persist datareader Pin
karam chandrabose7-Jan-07 16:21
karam chandrabose7-Jan-07 16:21 
AnswerRe: How to persist datareader Pin
sno-19-Jan-07 3:31
sno-19-Jan-07 3:31 
QuestionRemoving MenuStrip from MDI child Pin
AndrusM7-Jan-07 12:29
AndrusM7-Jan-07 12:29 
QuestionIs it possible to share Session Variables across multiple threads? Pin
travich7-Jan-07 9:19
travich7-Jan-07 9:19 
AnswerRe: Is it possible to share Session Variables across multiple threads? Pin
Christian Graus7-Jan-07 9:30
protectorChristian Graus7-Jan-07 9:30 
GeneralRe: Is it possible to share Session Variables across multiple threads? Pin
travich7-Jan-07 9:34
travich7-Jan-07 9:34 
GeneralRe: Is it possible to share Session Variables across multiple threads? Pin
Christian Graus7-Jan-07 9:38
protectorChristian Graus7-Jan-07 9:38 
GeneralRe: Is it possible to share Session Variables across multiple threads? Pin
Guffa7-Jan-07 12:04
Guffa7-Jan-07 12:04 
GeneralRe: Is it possible to share Session Variables across multiple threads? Pin
Christian Graus7-Jan-07 12:12
protectorChristian Graus7-Jan-07 12:12 
GeneralRe: Is it possible to share Session Variables across multiple threads? Pin
Guffa7-Jan-07 12:47
Guffa7-Jan-07 12:47 
AnswerRe: Is it possible to share Session Variables across multiple threads? Pin
Guffa7-Jan-07 12:02
Guffa7-Jan-07 12:02 
QuestionMFC to C#, form changing Pin
muharrem7-Jan-07 9:07
muharrem7-Jan-07 9:07 
AnswerRe: MFC to C#, form changing [modified] Pin
Mircea Puiu7-Jan-07 20:50
Mircea Puiu7-Jan-07 20:50 
QuestionTextBox problem Pin
CodeItWell7-Jan-07 8:34
CodeItWell7-Jan-07 8:34 
AnswerRe: TextBox problem Pin
Ed.Poore7-Jan-07 8:36
Ed.Poore7-Jan-07 8: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.