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:
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
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
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
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
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
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
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
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
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
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
Feb 22, 2011
want to make fast search over 5,00,000 records in asp.net web application.
View 5 Replies
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
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
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
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
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
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
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
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
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
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
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
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
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