5 2257
Hi, serge.
Lots of "old table", "new table" function.
Where is the original definition of those stuff?
Serge Rielau <sr*****@ca.ibm .com> wrote in message news:<30******* ******@uni-berlin.de>... Contains a major blurp on SELECT FROM INSERT and some other hopefully useful tricks.
http://www-106.ibm.com/developerwork...dm-0411rielau/
Enjoy Serge
Serge,
it is very interesting, thanks.
One thing about Delivery table function is not clear to me.
I don't understand if deadlocks are ever possible when calling the
function simultaneously from several connections.
Can you explain please?
AK wrote: Serge,
it is very interesting, thanks. One thing about Delivery table function is not clear to me. I don't understand if deadlocks are ever possible when calling the function simultaneously from several connections. Can you explain please?
There are no deadlocks possible (anymore).
Without SELECT FROM DELETE however the code would have to look like this:
SET VAR_O_ID
= (SELECT MIN(NO_O_ID)
FROM NEW_ORDER
WHERE NO_W_ID = DEL.W_ID
AND NO_D_ID = DEL.D_ID);
DELETE FROM NEW_ORDER
WHERE NO_O_ID = VAR_O_ID;
Since there is more than one delivery "daemon" chances are that two of
them will try to delete the same order.
Both will get a S lock on MIN(NO_O_ID) which they try to upgrade to an
exclusive lock.. and that would be the end.
Multiple solutions are thinkable involving at 2 SQL statements:
WITH RR USE AND KEEP EXCLUSIVE LOCKS will get the lock right away.
Using a cursor FOR UPDATE (over the ORDER BY) will position the row so a
DELETE WHERE CUURRENT OF can operate on it.
Cheers
Serge This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Gianluca_Venezia |
last post by:
Talking about high number of record seem ridiculus, if this number is
about 88.000
but
when I open a form, linked via ODBC to a MYSQL table, the open and the
use of that form is slow, and very slow if the form has combo
controls.
I have a order form, and a combo control for custemer codes.
Order table counts 88.000 records, customer tables has 1.500 records.
|
by: Tamir Khason |
last post by:
I just testing my program on Windows PE with Framework 1.1 pre-installed and
got a message "high encryption pack not installed" - what's the hell? The
only information I found in inet is related to some pyton issues with
networking, but nothing about .NET. Someone have a clue what it can be?
Thank you
--
Tamir Khason
You want dot.NET? Just ask:
|
by: asognoth |
last post by:
Hi...
Does anybody have a clue how to solve this problem?
the task is to change the following method in that manner that it
draws the (calculated) image form left to right instead of from top
to bottom. The image is actually a waterfall model of sound data.
I tried desperatly, but I don't see how to swap the x and y
coordinates.
|
by: Mike Hofer |
last post by:
While I'd toyed with C, C++, and Java over the last 20 years or so, my
principal language has been BASIC, QBASIC, then Visual Basic, and
finally Visual Basic .NET. But lately, I've been using C# and I
absolutely *love* it. It makes me think more about what I'm doing it
before I just spew code into the editor. I'm writing better code than
ever.
The only thing so far that I don't like about it is the switch
construct. I can't do this:
|
by: Mike Labosh |
last post by:
Code is easy. These are two OOP design issues that I am chewing on. Coming
from classic VB, I'm not great at OO design. I prefer to write mile long
spaghetti methods in a Temp module, and then refactor them.
Issue # 1
I have an Employee class that represents the state of an Employee record,
and an EmployeeListItem class that represents Employee stuff to be loaded
into a ListBox, e.g. EmployeeID, FirstName, LastName, ReadOnly...
| |
by: Xah Lee |
last post by:
The Nature of the “Unix Philosophy”
Xah Lee, 2006-05
In the computing industry, especially among unix community, we often
hear that there's a “Unix Philosophy”. In this essay, i dissect the
nature and characterization of such “unix philosophy”, as have been
described by Brian Kernighan, Rob Pike, Dennis Ritchie, Ken Thompson,
and Richard P Gabriel et al, and in recent years by Eric Raymond.
|
by: JohnQ |
last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post).
It would be more than a little bit nice if C++ was much "cleaner" (less
complex) so that it wasn't a major world wide untaking to create a toolchain
for it. Way back when, there used to be something called "Small C". I wonder
if the creator(s) of that would want to embark on creating a nice little
Small C++ compiler devoid of C++ language features that make...
|
by: blazedaces |
last post by:
I was working all day yesterday (and will probably be for most of today) with bytecode where java wrote the bytecode and matlab read it... I had never worked with bytecode in great detail before so this was quite a challenge. I mean, all in all, the experience was interesting and because it was harder then it should have been, more educational.
Still, I've been told almost every other program reads "low byte first" and thinking about it,...
|
by: ALi Shaikh |
last post by:
I searched the net countless times yet i am not able to find anything at all....does any know where I can find some info..??
|
by: Medvedev |
last post by:
i see serveral source codes , and i found they almost only use "new"
and "delete" keywords to make they object.
Why should i do that , and as i know the object is going to be destroy
by itself at the end of the app
for example:
class test
{
public:
int x;
|
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
| |
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: 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...
|
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 projectplanning, coding, testing, and deploymentwithout 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: 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...
|
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: 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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |