[dba-VB] vb.net - Updates

jwcolby jwcolby at colbyconsulting.com
Mon Apr 28 20:08:20 CDT 2008


It all happens automagically.  At this point I modify about 10K records 
at a clip, then issue a single update and it goes.  I set the batch size 
to 100 for this experiment but I will probably play with that to see 
what can be done.  I tried a thousand but it timed out.  I don't see any 
timeout period property though there might well be one somewhere.

I understand the SQL Injection attack thing but you need to remember 
that this is a database running on my system that only I ever access.

Even more importantly though, I need this kind of thing to just work, as 
quickly as I can make it happen.  I am not a high powered DBA (nor any 
other powered DBA) nor a high powered .Net programmer.

John W. Colby
www.ColbyConsulting.com


Eric Barro wrote:
> Yeah it is a terrible thing from a DBA point of view because it opens it up
> to SQL injection attacks since it builds your SQL statement on the fly.
> 
> I've tried it before and since it is generating it on the fly it makes it
> all the more harder to debug and offers the least amount of control from a
> DBA point of view. So...I let SQL server do all the work on the back end
> when it comes to batch updates by collecting the parameters and sending it
> to SQL server to process for the records it needs to process.
> 
> Based on what you are trying to do you are building an image of the data
> structure in memory, manipulating the data in memory and then committing the
> changes to the database in memory basically sending the update command for
> each record to the database back end right? Or am I mistaken in thinking
> that all of this magically happens by sending a single update command
> containing several individual update commands strung together?  
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Monday, April 28, 2008 3:11 PM
> To: VBA
> Subject: [dba-VB] vb.net - Updates
> 
> I THINK I have found my solution, called the SQLCommandBuilder.  I found
> reference to the command build saying how terrible it is, then a piece of
> code that, in simple plain language, shows how to use it all, using the
> simple objects I am already using.
> 
> We shall see.
> --
> John W. Colby
> www.ColbyConsulting.com
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 



More information about the dba-VB mailing list