Click here to Skip to main content
15,914,924 members
Home / Discussions / Database
   

Database

 
GeneralImporting Data in Bulk from SQL to Access Pin
Adnan5625-Mar-04 19:07
Adnan5625-Mar-04 19:07 
GeneralImporting Data in Bulk from SQL to Access Pin
Adnan5627-Mar-04 19:34
Adnan5627-Mar-04 19:34 
Generalusing LIMIT within a SELECT statment Pin
Matt Newman5-Mar-04 7:36
Matt Newman5-Mar-04 7:36 
GeneralRe: using LIMIT within a SELECT statment Pin
Henrik Stuart5-Mar-04 7:49
Henrik Stuart5-Mar-04 7:49 
GeneralRe: using LIMIT within a SELECT statment Pin
Matt Newman5-Mar-04 8:02
Matt Newman5-Mar-04 8:02 
GeneralRe: using LIMIT within a SELECT statment Pin
Lee Fuller5-Mar-04 9:18
Lee Fuller5-Mar-04 9:18 
GeneralFinalize and dispose Pin
sunsmile3-Mar-04 16:19
sunsmile3-Mar-04 16:19 
GeneralRe: Finalize and dispose Pin
Mike Dimmick4-Mar-04 5:20
Mike Dimmick4-Mar-04 5:20 
Asking on the .NET Framework or C# forum would be better.

Finalization is built into the CLR. When the garbage collector collects an object, if it has a finalizer, the object is added to the finalization queue (and the memory containing the object is pushed up into the older generation - it isn't actually collected). A separate thread, the finalization thread, is used to actually call the finalizers. Once the finalizer for the object has run, the object's memory can be collected (unless the object has resurrected itself, but we'll forget that for the moment). The Finalize method is a special hint to the CLR - if you override Finalize, the above takes place.

Dispose is a design pattern (also, with the support of the IDisposable interface). By convention, it allows the programmer to release scarce resources once the object is finished with. You should implement this if you hold a resource that is limited (such as a drawing object, or a database connection) or that could cause contention with other parts of the program (such as files). In these cases, you would normally also have a finalizer to act as a backstop in case the user doesn't call Dispose. You can call GC.SuppressFinalize in your Dispose method to tell the CLR that you've done all the necessary cleanup and it no longer needs to call your finalizer.

The IDisposable interface allows programs and environments to detect whether a Dispose method is implemented without using Reflection (which is a lot more costly). C#'s using block automatically calls IDisposable.Dispose on the controlled object at the end of the block.

See MSDN: Implementing a Dispose Method[^].

Stability. What an interesting concept. -- Chris Maunder
GeneralOpening a database connection in a client/server application Pin
girl_lash3-Mar-04 14:37
girl_lash3-Mar-04 14:37 
GeneralRe: Opening a database connection in a client/server application Pin
Rob Graham5-Mar-04 8:48
Rob Graham5-Mar-04 8:48 
GeneralRe: Opening a database connection in a client/server application Pin
girl_lash7-Mar-04 14:46
girl_lash7-Mar-04 14:46 
GeneralRe: Opening a database connection in a client/server application Pin
Rob Graham7-Mar-04 17:41
Rob Graham7-Mar-04 17:41 
GeneralSetting password to a converted database Pin
girl_lash3-Mar-04 13:55
girl_lash3-Mar-04 13:55 
GeneralRe: Setting password to a converted database Pin
Rob Graham5-Mar-04 9:18
Rob Graham5-Mar-04 9:18 
GeneralRetrieving Dates from Access Database using ODBC Pin
pavneet3-Mar-04 9:16
pavneet3-Mar-04 9:16 
GeneralRe: Retrieving Dates from Access Database using ODBC Pin
Rob Graham5-Mar-04 9:59
Rob Graham5-Mar-04 9:59 
GeneralRe: Retrieving Dates from Access Database using ODBC Pin
pavneet5-Mar-04 10:03
pavneet5-Mar-04 10:03 
GeneralRe: Retrieving Dates from Access Database using ODBC Pin
Rob Graham7-Mar-04 17:34
Rob Graham7-Mar-04 17:34 
GeneralRe: Retrieving Dates from Access Database using ODBC Pin
pavneet8-Mar-04 8:54
pavneet8-Mar-04 8:54 
GeneralDateTime not updating time Pin
cje3-Mar-04 7:54
cje3-Mar-04 7:54 
GeneralConnecting to MySQL with ODBC Pin
sps-itsec463-Mar-04 2:56
sps-itsec463-Mar-04 2:56 
Generalconnection to SQL Server from extranet Pin
MyttO3-Mar-04 0:29
MyttO3-Mar-04 0:29 
GeneralRe: connection to SQL Server from extranet Pin
Mike Dimmick3-Mar-04 2:10
Mike Dimmick3-Mar-04 2:10 
GeneralRe: connection to SQL Server from extranet Pin
Mike Dimmick3-Mar-04 2:27
Mike Dimmick3-Mar-04 2:27 
GeneralMany thanks Pin
MyttO4-Mar-04 23:12
MyttO4-Mar-04 23:12 

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.