Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
GeneralRe: Weird class cast issue Pin
serious-sam21-Apr-05 17:51
serious-sam21-Apr-05 17:51 
QuestionHow to Escape the ";" Pin
CSharpBala21-Apr-05 17:14
CSharpBala21-Apr-05 17:14 
AnswerRe: How to Escape the ";" Pin
Ashok Dhamija21-Apr-05 18:05
Ashok Dhamija21-Apr-05 18:05 
AnswerRe: How to Escape the ";" Pin
leppie21-Apr-05 19:42
leppie21-Apr-05 19:42 
Generalconnection.close or .dispose Pin
vcllvc21-Apr-05 16:54
vcllvc21-Apr-05 16:54 
GeneralRe: connection.close or .dispose Pin
Christian Graus21-Apr-05 18:14
protectorChristian Graus21-Apr-05 18:14 
GeneralRe: connection.close or .dispose Pin
Dave Kreskowiak22-Apr-05 1:14
mveDave Kreskowiak22-Apr-05 1:14 
GeneralRe: connection.close or .dispose Pin
S. Senthil Kumar22-Apr-05 3:02
S. Senthil Kumar22-Apr-05 3:02 
Destroy the object and tagging it for GC? I don't agree, Dispose can only release managed/unmanaged resources, how does it make it eligible for GC? GC only checks for the reachability of objects, AFAIK and calling Dispose doesn't help in getting it GC'ed.

Generally, Close and Dispose are supposed to do the same thing. What connection object are you talking about? In case it is an SqlConnection, the MSDN doc clearly says "If the SqlConnection goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling Close or Dispose."

BTW, remember about the other thread where we were discussing about connection pooling. The MSDN doc for the Close method says "It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled.". So obviously, if you use connection pooling, pooled database connections remain open.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: connection.close or .dispose Pin
Dave Kreskowiak22-Apr-05 5:26
mveDave Kreskowiak22-Apr-05 5:26 
GeneralRe: connection.close or .dispose Pin
vcllvc22-Apr-05 17:20
vcllvc22-Apr-05 17:20 
GeneralRe: connection.close or .dispose Pin
S. Senthil Kumar22-Apr-05 18:19
S. Senthil Kumar22-Apr-05 18:19 
QuestionRichTextBox not display the right string? Pin
Snowjim21-Apr-05 14:01
Snowjim21-Apr-05 14:01 
AnswerRe: RichTextBox not display the right string? Pin
Hawk33721-Apr-05 15:30
Hawk33721-Apr-05 15:30 
GeneralRe: RichTextBox not display the right string? Pin
Snowjim21-Apr-05 22:36
Snowjim21-Apr-05 22:36 
GeneralRe: RichTextBox not display the right string? Pin
Snowjim22-Apr-05 4:00
Snowjim22-Apr-05 4:00 
GeneralRe: RichTextBox not display the right string? Pin
Snowjim22-Apr-05 4:11
Snowjim22-Apr-05 4:11 
AnswerRe: RichTextBox not display the right string? Pin
leppie22-Apr-05 6:42
leppie22-Apr-05 6:42 
GeneralReg Ex Pin
mvermef21-Apr-05 13:00
mvermef21-Apr-05 13:00 
GeneralRe: Reg Ex Pin
leppie21-Apr-05 19:46
leppie21-Apr-05 19:46 
GeneralPopulating an XSD Dataset Pin
SignMan35921-Apr-05 11:10
SignMan35921-Apr-05 11:10 
GeneralRe: Populating an XSD Dataset Pin
Carl Mercier21-Apr-05 15:21
Carl Mercier21-Apr-05 15:21 
GeneralRe: Populating an XSD Dataset Pin
Hrashita Triapthi21-Apr-05 21:23
Hrashita Triapthi21-Apr-05 21:23 
GeneralHelp Plz in that e-mail client Pin
SherKar21-Apr-05 9:26
SherKar21-Apr-05 9:26 
GeneralRe: Help Plz in that e-mail client Pin
John Fisher22-Apr-05 7:45
John Fisher22-Apr-05 7:45 
Questionbyte[] ? Pin
Snowjim21-Apr-05 9:02
Snowjim21-Apr-05 9:02 

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.