You are here: Re: flexible back-end data handling in .net + sql project « MsSQL Server « IT news, forums, messages
Re: flexible back-end data handling in .net + sql project

Posted by David Portas on 11/15/05 19:33

1. You certainly ought to do this set-based rather than row by row as
your code fragment implied. What you can also do is batch the UPDATEs
into X rows at a time. For example:

SET ROWCOUNT 50000

WHILE 1=1

BEGIN

UPDATE dataTable
SET fieldE = 'fieldE_valueF'
WHERE EXISTS
(SELECT *
FROM dataTable AS T
WHERE fieldA = 'fieldA_valueB'
AND T.fieldC = dataTable.fieldC
AND T.fieldD = dataTable.fieldD);

IF @@ROWCOUNT = 0 BREAK

END

SET ROWCOUNT 0

2. Why would you want to do audit logging in the front end? I don't
understand the question.

3. What is your reason for wanting dynamic code rather than static?
This just comes down to change management controls. Dynamically
altering fundamental chunks of business logic without a release and
test cycle is a great recipe for really screwing things up. Would you
consider doing the same thing for C# code? I don't think so.

--
David Portas
SQL Server MVP
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация