Find Jobs
Hire Freelancers

Batch Updates for Large Data in C#

$100-500 USD

Cancelado
Publicado hace casi 17 años

$100-500 USD

Pagado a la entrega
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 del proyecto: 2975951

Información sobre el proyecto

5 propuestas
Proyecto remoto
Activo hace 17 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
5 freelancers están ofertando un promedio de $119 USD por este trabajo
Avatar del usuario
See private message.
$148,75 USD en 2 días
5,0 (129 comentarios)
7,8
7,8
Avatar del usuario
See private message.
$85 USD en 2 días
5,0 (14 comentarios)
5,7
5,7
Avatar del usuario
See private message.
$148,75 USD en 2 días
4,6 (32 comentarios)
4,9
4,9
Avatar del usuario
See private message.
$85 USD en 2 días
4,5 (4 comentarios)
2,8
2,8
Avatar del usuario
See private message.
$127,50 USD en 2 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Omaha, United States
5,0
44
Forma de pago verificada
Miembro desde jun 1, 2006

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.