473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Memory Handling - DataTable and SQL Database

Hey guys Im having some problem with handling DataTable memory, here's my predicament; Ive got a TableAdapter and Dataset from a SQL Database that I am inserting records to. These records are being inserting directly to schema using a DataRow of the table from the dataset (I cant use the insert query from the tableadapter because there are over 100 columns in the table that its being inserted to.)

My problem is that the datatable seems to be getting stored in memory from the dataset I am using on the form, and I am running out of memory before I finish inserting all the data into SQL (Over 1m records). Is there a way I can just use dataset schema and tableadapter without the datatable being stored in memory, or how am I going about this wrong?

Thanks
Oct 25 '10 #1
1 1399
Ok guys, I think I've got it. I didnt know that when you add a dataset to the form using the Designer, it turns on the Generate Member property, which automatically saved the datatable in memory and declares it, etc. If you change this property to false, you can declare your own instance of the datatable, and dispose it as often as necessary to keep memory usage down. Just an FYI incase anyone else runs into this.

Thanks
Oct 25 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Edward Singleton | last post by:
I am currently developing a web app using WSAD 5.1 and DB2 V7.2.8. I understand there is a myriad of database errors related to obtaining valid connections that are mapped directly to...
0
by: David P. Donahue | last post by:
Does anyone have any experience using MySQL databases with their C# projects? I have a DataList on a webpage that gets its values from a DataSet that's populated from a MySQL database. One of the...
1
by: basha | last post by:
hi can u help me how to write code to handle errors in dabase in asp.net pls,very urgent bye basha
0
by: Lau Lei Cheong | last post by:
Hello, I'm writing a project that involves entering chinese character into MySQL database. Since 1) connection-based coding selection requires an upgrade to version 4.1.1 or above and my...
4
by: Mike | last post by:
Assume i have a db connection and a datareader for that connection. Now I perform a query that retrieves 100MB of data. I know that the data reader gets 1 row at a time. However, there is a...
17
by: frederic.pica | last post by:
Greets, I've some troubles getting my memory freed by python, how can I force it to release the memory ? I've tried del and gc.collect() with no success. Here is a code sample, parsing an XML...
10
by: Reza2 | last post by:
Hello I am using a subroutine to solve relatively large matrix in C++ but I got an error with this text "The exception unknown software exception (0x0000005) occurred in the application at...
4
by: gamaz | last post by:
Hi, I am trying to work on a stored procedure that will work with multiple database. I have a prototype of multiple databases. Those are named as the following: ts2_aldkm_app, ts2_aldkp_app,...
3
by: =?Utf-8?B?RW1tYQ==?= | last post by:
Hello I have a database which I access through the Internet using ASP now my SELECT statement isn't working now that I've changed the text values of Yes/No to boolean values of Yes/No. What can I...
2
by: Nabangi | last post by:
Hi, Ive 2 programs at different memory locations. I wish to execute the 2nd program in the 1st by using a function pointer ( int *(funcptr()) in the 1st program by passing the address of the main...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.