C# - Insert Large Amount Of Data Using Linq-to-sql?

Jul 14, 2010

I need to insert large amount of data into SqlServer 2008. My project is based on linq-to-sql.

I process csv file with 100.000 rows. Each row is mapped to Order object. Order contains also collection of Category and Code objects. I need to map each row to object in order to validate it.

Then I need to insert all these objects into database.

List<Order> orders = Import("test.csv");
db.Orders.InsertAllOnSubmit(orders);
db.SubmitChanges();
OR
foreach(Order order in orders)
db.Orders.InsertOnSubmit(order);
db.SubmitChanges();

Both ways are slow. Is there any workaround? I may use other approach than l2sql for this task.

I read about SqlBulkCopy class - would it handle inserting child entities as well?

View 4 Replies


Similar Messages:

DataSource Controls :: How To Insert Large Amount Of Data Into Sql Server In Few Minutes

Feb 15, 2010

I have contact mails large than 700.000 Mails and i want to insert them in sqlserver using c# in a few minutes not hours i know that pre impossible but , i know there`s way to do it

View 4 Replies

SQL Server :: Insert Large Amount Of Data In Sql Server 2005 Database With Every Time Duplicate Check?

Feb 6, 2011

I want to generate 30,000 cards and each card must be duplicate check with database. In my card, there are 2 things. Serial No and CardID. If any card already exists then I generate another card id but with the same serial no.

So how faster way I can generate 30,000 card with duplicate check? Which one I have made application, it takes about 25 minutes to insert.

View 33 Replies

C# - How To Export Large Amount Of Data To Excel

Dec 23, 2010

If you had to get large amount data(nearly 230.000 rows) from database(I use oracle) to an excel file with asp.net, how would you do it?

View 2 Replies

How To Display A Large Amount Of Data In Gridview

Jan 7, 2011

I am trying to show a large amount of data in gridview but the problem is that everytime data increase the gridview row size increase automatically.

is there any possible way that the data which is stored in my MS access Database display in multi line instead of one single long line.

View 4 Replies

Access :: Handling Large Amount Of Data?

May 3, 2010

I have a database of about 50 tables and some of the tables have more than 9999999 records. When I try to fetch some data on some SQL statements, sometimes it takes more then 5 minutes. I would like to know if there is good searching approach to get data from that much records in many tables.

View 6 Replies

SQL Server :: Store Large Amount Of Data In DB?

Dec 18, 2010

i want to to sotre large amount of character in one field of a table i use text-nvarchar(max) and but it show me this exception

(String or binary data would be truncated The statement has been terminated.) I know that text and nvarchar can store 8000 character

View 7 Replies

Writing .txt File When There Is Large Amount Of Data?

Jul 22, 2010

i have write data from db to .txt file,where db have large amount data,i need to wite data into file, if some error occure, then reInitiated that file and write data again without stop process.that is Continuous calling same process

View 2 Replies

JQuery :: Best Grid For Large Amount Of Data?

Dec 5, 2010

I was looking for JQuery Grid which will help me more than 1000 - 2000 records. I mainly need search and paging . Can some tell me with its own experience

View 3 Replies

Show Some Contents Out Of Large Amount Of Data?

Nov 8, 2010

i want to show some contents out of large amount of data...and want to apply read more link so that after clicking the link all data will shows on next page..how can i show the some contents out of large data ....

View 1 Replies

ADO.NET :: Is Filter Expression Is Good For Large Amount Of Data

Feb 20, 2011

I have above 4,00,000 records. I have more searching options.

Is filter expression is good for better performance or I will build the query with WHERE condition?

Which process is better for searching in large amount of data?

View 1 Replies

ADO.NET :: How To Make Effecient Search On Large Amount Of Data

Feb 22, 2011

want to make fast search over 5,00,000 records in asp.net web application.

View 5 Replies

ADO.NET :: How To Increase Large Amount Of Data Display Performance

Feb 20, 2011

I have about 5,00,000 data. I want to display the records according to group by. It takes to me about 2 minutes. Is it good?

If not, then what is best process to display the record in a very fast way?

Moreover, I have encrypted one field in database and encryption is done from my code behind. So when I display the records, I have to decrypt those. That's why I make paging on 100 records per page.

View 4 Replies

Databases :: Cannot Make Connection While Uploading Large Amount Of Data

Mar 6, 2010

have developed a Asp.net application which uploads data from Excell Sheet and then Inserts those data after doing several Checks to the Mysql data base.The Issue which Iam facing is that when Iam uplading lage amount of data at a time say around that 10000, the application crashes and gives the Unable to Open connection to server Error.The same app works well 1000-2000 data.

View 1 Replies

WCF / ASMX :: How To Speed Up Response When Large Amount Of Data Is Returned

May 8, 2010

I have a WCF method that returns a huge number of rows, causing a long wait for end user.

Also I do not have IIS7 but only IIS 6 for my WCF.

Is there any way I can speed up the WCF response so user does not wait for a longer time?

View 4 Replies

State Management :: Storing Temporary And Large Amount Of Data?

Jun 9, 2010

I have a scenario for which I wanted the best solution in asp.net c#. My application allows users to retrieve search data from database, this data is the users own temporary list of records which they can search, delete records or select them. All these actions are only on users temporary data list and not on the data base. I have currently carried out this functionality using data table which is stored in session. This method is causing problems when huge amounts of data is held in session (eg: 7000 records). I need a best possible solution for this. Is creating temporary tables an option? Can it be assigned to particular user sessions? Please point me to the right direction and right articles.

View 5 Replies

State Management :: How To Store A Large Amount Of Data In User's Session

Sep 29, 2010

I need to store a large amount of data in user's session but I guess using Session Object is not the best way of doing that. Is there any other way around??? Remember I don't have small variables to store, I have large collections.

View 5 Replies

Forms Data Controls :: How To Display Large Amount Of Data (about 150.000) On One Page Without Paging

Mar 5, 2010

we have a classic ASP Webpage for displaying reporting data.

The process is following:

user inputs reporting criteria reporting criteria are passed to a method in a VB6 DLL containing the reporting business logic (generating a dynmic sql statement) VB6 DLL method returns xml data xml data are displayed with xsd transformation 150.000 datarows are displayed in some seconds (less than 10 seconds maybe) Now we want to extend this reporting function and decided to use asp.net (2.0) So I have written a little prototyp application with a SqlDataSource Object and a GridView Control.

A table with less data (about 100 or so) are displayed quickly.

But a view with about 150.000 datarows needs about 2 minutes and ended with a OutOfMemoryException!

The request of the customer is definitvely to display the data on one page like in the old classic asp application!

View 1 Replies

Data Controls :: Display Large Amount Of Data In GridView With Search Functionality?

Mar 7, 2014

how to display large amount of data in griedview with serach funcationality.(the data should be 20 L)with example in asp.net.

View 1 Replies

Web Forms :: How To Increase Speed To Populate Dropdown List With Large Amount Data

Jan 11, 2010

I have Sql Table for Products that have ~8000 records. In my web form I want use dropdown list to edit code with dropdown list. This drop down list populate very slow. How to increase speed to populate dropdown list with large amount data.

View 1 Replies

Data Controls :: Populate GridView Using JQuery AJAX With Large Amount Of Data Not Working

May 7, 2015

I want to bind large amount of data in gridview using jquery but without paging.

I am taking reference from this post

[URL]

But when there is large amount of data, it's not working

View 1 Replies

Web Forms :: Displaying Large Amount Of Text

Nov 16, 2010

i need to display large amount of text on web page. I want the text to conform to the width of div column it is in and extend to the height based on the amount of text ...if text is too long then i want something like 'more' button,at the bottom of teh text and clicking that shows the rest of the text,kind of like newspaper column.

View 4 Replies

Architecture :: Serving A Large Amount Of Users On A Web Server?

Oct 5, 2010

I have a project that will be assigned to me soon whereby I need to develop a survey which needs to support 40,000 users approximately. Now we are thinking of doing a staged approach so not all users are on the server at any one point of time. Probably splitting it so we can serve at least a few thousand of users...

I dont have much experience of how I can ensure to serve those levels of users on a server and how to manage this so I am after some advice?

From my understanding I need to do some stress testing on a server and obviously I need some figures i.e. average size of request, average size of response and content of response.

- Do I have to build the database and add records in to see what size is a typical survey row?

- Do I have to build the survey in .NET i.e. by adding controls etc and seeing what size is the page?

- The survey shouldnt be too instensive processing wise, it will be adding information into a backend sql database...

View 4 Replies

DataSource Controls :: Amount Of Time Between Two Dates Compared To A Value Using Linq?

Apr 8, 2010

How would I determine the amount of time in weeks between two dates and compare that value to another value in Linq, for example:

Where the amount of time in weeks between (startdate and enddate) = value x

View 1 Replies

DataSource Controls :: Linq To Sql - Calculate Shopping Cart Total Amount

Jul 9, 2010

I am trying to calculate the total amount of shopping cart by multiplying the quantity with the product price and then sum up the sub results.I am doing this but it does not make the multiplication.

[Code]....

decimal? TotalAmount = (from shopCart in dc.KP_ShoppingCarts

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved