Find Jobs
Hire Freelancers

Batch Updates for Large Data in C#

$100-500 USD

Скасований
Опублікований almost 17 years ago

$100-500 USD

Оплачується при отриманні
Okay, I need some help. I can't seem to find the absolute correct and standard way to accomplish this. So, I need to turn to the experts :). I have a datatable, lets call it documents. It has 3 fields: docid (pkey, identity, increments) url (string, should be unique) body (string) I am using sql server 2005 and .net 2.0 (c#). I need to know 2 things. 1) How can I tell sql server, that the url field should be unique, and that someone attempts to put 2 of the same url into the db, an error should be thrown? 2) How can I do large batch updates to avoid trips to the db? Right now, I have an external source (spider) providing urls, and bodies for the table. I also have a very fast cache of hashes of the urls and ids. So I can very quickly check if a url needs to be updated or inserted by checking this cache. The spider gives me a collection of objects, which are essentially url, body pairs. I then check to see which urls do not exist, using the cache, and insert these urls using sqlbulkcopy. sqlbulkcopy is mega fast! Next I gather the urls that do exist, (using the cache), currently I use the attached algorithm to populate a DataTable and try to update the datasource with this table. But I get an error saying that rows marked with new must use an insert command, so I believe I'm doing something wrong. The message is: {"Update requires a valid InsertCommand when passed DataRow collection with new rows."} So the question is: How can I do a faster/easier batch update when the is external to sql server? ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform .net 2.0 sql server 2005
ID проекту: 2975951

Про проект

5 пропозицій(-ї)
Дистанційний проект
Активність 17 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
5 фрілансерів(-и) готові виконати цю роботу у середньому за $119 USD
Аватарка користувача
See private message.
$148,75 USD за 2 дні(-в)
5,0 (129 відгуки(-ів))
7,8
7,8
Аватарка користувача
See private message.
$85 USD за 2 дні(-в)
5,0 (14 відгуки(-ів))
5,7
5,7
Аватарка користувача
See private message.
$148,75 USD за 2 дні(-в)
4,6 (32 відгуки(-ів))
4,9
4,9
Аватарка користувача
See private message.
$85 USD за 2 дні(-в)
4,5 (4 відгуки(-ів))
2,8
2,8
Аватарка користувача
See private message.
$127,50 USD за 2 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED STATES
Omaha, United States
5,0
44
Спосіб оплати верифіковано
На сайті з черв. 1, 2006

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.