473,698 Members | 2,524 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.

FWIW.
Jul 20 '05
11 5138
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
KA
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
transaction.
Jul 20 '05 #12

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

Similar topics

1
469
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...
0
357
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
3
1431
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?
1
3415
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. '*******************************************************************
0
1741
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).
0
1049
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
5
5085
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....
1
3590
patjones
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,...
2
1113
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))) --------------------------------------------------
0
8678
marktang
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...
0
8609
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,...
0
9166
Oralloy
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...
0
9030
jinu1996
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...
1
8899
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,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
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.