Find Jobs
Hire Freelancers

Batch Updates for Large Data in C#

$100-500 USD

キャンセル
投稿日: 17年近く前

$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年前

お金を稼ぎたいですか?

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
お支払い方法確認済み
メンバー登録日:6月 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)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。