Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Memory leak problem using sqlBulkCopy

Reply
 
Old 11-05-2008   #1 (permalink)
SteveB


 
 

Memory leak problem using sqlBulkCopy

Hi All,

Using Windows Vista Ultimate 64 bits with MS SQL 2005 SP2.

When ever I am trying to import big files like a CSV format with 24 mil
records I am getting a memory leak
which will consume all available memory available. When I close Visual
Studio 2008, still the memory will not still
be released into the OS.

I need basically to reboot in order to claim back the memory. Here is the
driver that I am using for the CSV
format. Below is some sample code.

Any idea how to resolve the memory leak problem?

Dim connbuilderOLEDB As New OleDbConnectionStringBuilder

connbuilderOLEDB("Provider") = "Microsoft.Jet.OLEDB.4.0"

connbuilderOLEDB("Extended Properties") =
"text;HDR=Yes;FMT=Delimited(',')"

connbuilderOLEDB("Data Source") =
Path.GetDirectoryName(DBFileName)

ConnStrOleDb = connbuilderOLEDB.ConnectionString


Using connOleDb As New OleDbConnection(ConnStrOleDb)

connOleDb.Open()

Dim dbcmd As New OleDbCommand(String.Format("select * from {0}",
TableName), connOleDb)

dbcmd.CommandTimeout = SQL_TIMEOUT

bulkcopy.WriteToServer(dbcmd.ExecuteReader())

connOleDb.Close()

connOleDb.Dispose()

End Using



Thanks,



Steve



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Vista Sp1 Memory Leak problem Vista General
Memory Leak problem with AUDIODG.EXE ! Need help Sound & Audio
SqlBulkcopy memory leak problem .NET General
Memory Leak General Discussion
Memory leak Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46