Click here to Skip to main content
15,891,674 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 10:59
pbsjr5-Dec-10 10:59 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 11:08
sitebuilderLuc Pattyn5-Dec-10 11:08 
Question"Cannot open any more tables" happens when I optimize my code [modified] Pin
i_kant_spel4-Dec-10 19:04
i_kant_spel4-Dec-10 19:04 
AnswerRe: "Cannot open any more tables" happens when I optimize my code [modified] Pin
Luc Pattyn4-Dec-10 23:27
sitebuilderLuc Pattyn4-Dec-10 23:27 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 7:58
i_kant_spel5-Dec-10 7:58 
AnswerRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 8:16
sitebuilderLuc Pattyn5-Dec-10 8:16 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 9:06
i_kant_spel5-Dec-10 9:06 
AnswerRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 9:52
sitebuilderLuc Pattyn5-Dec-10 9:52 
i_kant_spel wrote:
The first Read occurs 1320 times.
The second executeReader occurs 1319 times.


OK, you need some Dispose() calls.
While the garbage collector will eventually collect whatever objects you no longer need, it is wise to call Dispose() on those objects that are no longer in use and are instances of a class that offers a public Dispose(). This helps the system to cope with unmanaged resources, and to behave better when using scarce resources. It would not apply to objects you did not create yourself or didn't order creation of (such as PaintEventArgs.Graphics in a Paint handler).

It does apply to OleDbCommand and OleDbDataReader.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.


GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 10:59
i_kant_spel5-Dec-10 10:59 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 11:04
sitebuilderLuc Pattyn5-Dec-10 11:04 
QuestionHow to use Insert Command for Varchar(Max) Pin
Paramu19734-Dec-10 3:34
Paramu19734-Dec-10 3:34 
AnswerRe: How to use Insert Command for Varchar(Max) Pin
Luc Pattyn4-Dec-10 3:45
sitebuilderLuc Pattyn4-Dec-10 3:45 
QuestionVB6 ActiveX program get invoked from Source folder not program files. Pin
QuickBooksDev4-Dec-10 3:29
QuickBooksDev4-Dec-10 3:29 
QuestionType conversion? Pin
waner michaud1-Dec-10 8:10
waner michaud1-Dec-10 8:10 
AnswerRe: Type conversion? Pin
Dave Kreskowiak1-Dec-10 8:54
mveDave Kreskowiak1-Dec-10 8:54 
GeneralRe: Type conversion? Pin
waner michaud1-Dec-10 9:36
waner michaud1-Dec-10 9:36 
GeneralRe: Type conversion? Pin
Dave Kreskowiak1-Dec-10 14:08
mveDave Kreskowiak1-Dec-10 14:08 
GeneralRe: Type conversion? Pin
phil.o2-Dec-10 22:46
professionalphil.o2-Dec-10 22:46 
QuestionDoes AnyBody Faced This Problem? While sending E-Mails to Multiple clients... Pin
Paramu19731-Dec-10 1:00
Paramu19731-Dec-10 1:00 
AnswerRe: Does AnyBody Faced This Problem? While sending E-Mails to Multiple clients... Pin
Luc Pattyn1-Dec-10 2:36
sitebuilderLuc Pattyn1-Dec-10 2:36 
GeneralRe: Does AnyBody Faced This Problem? While sending E-Mails to Multiple clients... Pin
Paramu19731-Dec-10 2:42
Paramu19731-Dec-10 2:42 
QuestionMessage Closed Pin
30-Nov-10 14:37
Josh668030-Nov-10 14:37 
AnswerRe: How would I check if a certain process is running? Pin
Dave Kreskowiak30-Nov-10 15:10
mveDave Kreskowiak30-Nov-10 15:10 
QuestionMessage Closed Pin
1-Dec-10 10:44
Josh66801-Dec-10 10:44 
AnswerRe: How would I check if a certain process is running? Pin
Dave Kreskowiak1-Dec-10 14:14
mveDave Kreskowiak1-Dec-10 14:14 

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.