473,472 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using Garbage Collection after import

Hi All,

I am using the SqlBulkCopy for import data into ms sql 2005. I need to
import multipe files which could be from 1 to GB each. Is there need to use
a garbage collection for this purpose since the files are pretty big.

Thanks,

Steve
Oct 19 '08 #1
2 858
as long as you use a using statement (or call dispose) then no worries.

using (var conn = new SqlConnection(connectionString))
{
conn.Open();
using (var bulkCopy = new SqlBulkCopy(conn))
{
// copy code here
}
}

if you are doing file i/o, be sure also use a using.
-- bruce (sqlwork.com)

SteveB wrote:
Hi All,

I am using the SqlBulkCopy for import data into ms sql 2005. I need to
import multipe files which could be from 1 to GB each. Is there need to use
a garbage collection for this purpose since the files are pretty big.

Thanks,

Steve

Oct 19 '08 #2
Thanks Bruce.
as long as you use a using statement (or call dispose) then no worries.

using (var conn = new SqlConnection(connectionString))
{
conn.Open();
using (var bulkCopy = new SqlBulkCopy(conn))
{
// copy code here
}
}

if you are doing file i/o, be sure also use a using.
-- bruce (sqlwork.com)

SteveB wrote:
>Hi All,

I am using the SqlBulkCopy for import data into ms sql 2005. I need to
import multipe files which could be from 1 to GB each. Is there need to
use a garbage collection for this purpose since the files are pretty big.

Thanks,

Steve

Oct 20 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thomas Mailund | last post by:
Hi group. I have a problem with some C extensions I am working with and hope that some of you can help. Basically, I am wrapping a a tree structure from C where I have python methods for...
16
by: Stef Mientki | last post by:
If I create a large array of data or class, how do I destroy it (when not needed anymore) ? Assign it to an empty list ? thanks, Stef Mientki
1
by: SteveB | last post by:
Hi All, I am using the SqlBulkCopy for import data into ms sql 2005. I need to import multipe files which could be from 1 to GB each. Is there need to use a garbage collection for this purpose...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.