473,883 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

warning re ADO .UpdateBatch method

Awhile back there was some discussion about ways of sending multiple
rows of data to SQL Server. The ADO .UpdateBatch method was one of
the possibilities mentioned, and Erland said he thought that probably
once the data get to SQL Server they are probably actually inserted
one row at a time. I just want to say that based on an experience I
had a couple of days ago I am now sure that is the case. I was using
..UpdateBatch for something quick and dirty I had to do just once and
was too lazy to use XML for. An error was generated during the
..UpdateBatch process because of invalid data in one row. However, a
large number of the rows in the batch WERE written to the database.

Until now I haven't used .UpdateBatch in a production environment only
because this implies granting INSERT or UPDATE privileges to the user.
But based on this experience I would NEVER use .UpdateBatch in a
production environment, even for a user like a batch job where the
permissions would not be an issue.

Jul 20 '05
11 5150
Why do you assume I don't know what a transaction is? My question is
whether the ADO .UpdateBatch method respects that.

On Thu, 22 Apr 2004 16:27:45 -0400, "KA" <ab***@aol.co m> wrote:
This is the whole purpose of transactions. You commit/roll back all changes
that was done in the transaction.

Jul 20 '05 #11
Of course it does.

UpdateBatch will use whatever connection is associated with the RS and will
simply translate your changes into a bunch of insert, update and delete
statements wrapped by sp_executesql.

If you are in a transaction, your UpdateBatch calls will be part of that
Jul 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ellen K. | last post by:
Awhile back there was some discussion about ways of sending multiple rows of data to SQL Server. The ADO .UpdateBatch method was one of the possibilities mentioned, and Erland said he thought that probably once the data get to SQL Server they are probably actually inserted one row at a time. I just want to say that based on an experience I had a couple of days ago I am now sure that is the case. I was using ..UpdateBatch for something...
by: Giovanni pepe | last post by:
I have then necessity of utilize old UpdateBatch of vb6 in VB DotNet.. I have View as in net it must be used Command Builder, Where I can find some example... Thank you
by: Capstar | last post by:
Hi NG, I have a library of which I want to change the name of a specific method so it is more intuitive. I plan to keep the old method in there for now so I won't break any existing code. But I would like to get a compile time warning when this method is called. That way a programmer using this library sees the warning and can change his/her code. Is this possible and if yes, how?
by: Vascelli Germano | last post by:
I'm currently experiencing a problem using ADO 2.7 with DB2 7 (DB2 UDB FOR OS/390 V7). I use ODBC like datasource. After populating a disconnected recordset, reconnecting it, and doing a UpdateBatch the application (VB6) disappears - it just stops and vanishes. can anyone suggest a way for solve my problem? Thanks. '*******************************************************************
by: Peter | last post by:
Hi, I've been recently porting some software written under VC++ 6.0 to VC .NET. The software was compiling fine under 6.0 but under .NET I'm getting linker warning: b.obj : warning LNK4227: metadata operation warning (00131189) : Inconsistent parameter information in duplicated methods (methods: new; type: <Module>): (0x08000005).
by: Giovanni pepe | last post by:
This is my error : <<impossible to approach the information on the line eliminated through the line>> This is my code for updateBatch : Private mSqlConn as sqlConnection Public Function UpdateBatch(ByVal DTable As DataTable) Dim mSqlDa As SqlDataAdapter Dim MustCloseConnection As Boolean
by: Peter Ritchie [C# MVP] | last post by:
I've purposely been ignoring a CA2122 warning in some C++ interop code I've been working on for quite some time. I've just recently had the cycles to investigate the warning. The warning message is as follows Warning CA2122 : Microsoft.Security : MyClass.Method():Void calls into Marshal.GetExceptionPointers():IntPtr which has a LinkDemand. By making this call, Marshal.GetExceptionPointers():IntPtr is indirectly exposed to user code....
by: patjones | last post by:
Hi: I am attempting to pull a backend table into a local recordset, make some changes to it, and commit the changes back to the table. I'm using an ADO recordset in Access 2007. The backend resides on a network drive while the front end is on my C: drive. My code is as follows: Dim rstBalances As New ADODB.Recordset Dim strSQL As String strSQL = "SELECT fldDateEffective, fldCurrentAL, fldCurrentSick, fldCurrentCT,...
by: Brian | last post by:
Hi, No matter how i do this, I get the same warning. I don't understand the warning.... Dim FILETYPE as string() = {"tree;.tree;*.tree"} for x as integer = 0 to ubound(FILETYPE) Orginal line--------------------------------------- FILETYPE(0) = Lcase(FILETYPE(0).Concat(".", FILETYPE(0))) --------------------------------------------------
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.