This is regarding SQL stored procedures. The guide says this about handler
declaration in SQL procedures:
"handler declaration can specify a SQL-procedure-statement.
SQL-procedure-statement is a set of statements that execute when the
handler receives control."
But I don't understand how a 'set of statements' can be specified as a
SQL-procedure-statement when UDB does not allow nested compound
statements.
Also, any idea why I cannot use the following in SQL procedure:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION GOTO ERROR_HANDLE;
The above line gives an error during CREATE PROCEDURE: SQL0104N - An
unexpected token GOTO was found; expected tokens may include SET.
Thanks.
Raquel. 4 3545
Continuing with the above question, at one place, the manual states that
both the SQLSTATE and SQLCODE variables can be declared only in the
'outermost' compound statement of the SQL procedure.
And then, it of course says that compund statements cannot be nested.
If they cannot be nested, what does 'outermost' compound statement mean?
Think I am missing some fundamental here.
TIA
Raquel.
"Raquel" <ra****@nospam. com> wrote in message
news:fe******** *************** *******@localho st.talkaboutdat abases.com... This is regarding SQL stored procedures. The guide says this about handler declaration in SQL procedures:
"handler declaration can specify a SQL-procedure-statement. SQL-procedure-statement is a set of statements that execute when the handler receives control."
But I don't understand how a 'set of statements' can be specified as a SQL-procedure-statement when UDB does not allow nested compound statements.
Also, any idea why I cannot use the following in SQL procedure:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION GOTO ERROR_HANDLE;
The above line gives an error during CREATE PROCEDURE: SQL0104N - An unexpected token GOTO was found; expected tokens may include SET.
Thanks. Raquel.
I would recommend the following book on stored procedures;
"DB2 SQL Procedural Language for Linux, UNIX, and Windows"
By Paul Yip, Drew Bradstock, Hana Curtis, Michael Gao, Zamil Janmohamed,
Clara Liu, Fraser McArthur
Published by Prentice Hall PTR.
You can download Chapter 5. "Exception Handling" for free at: http://www-106.ibm.com/developerwork...p/splbook.html
Raquel wrote: This is regarding SQL stored procedures. The guide says this about handler declaration in SQL procedures:
"handler declaration can specify a SQL-procedure-statement. SQL-procedure-statement is a set of statements that execute when the handler receives control."
But I don't understand how a 'set of statements' can be specified as a SQL-procedure-statement when UDB does not allow nested compound statements.
Also, any idea why I cannot use the following in SQL procedure:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION GOTO ERROR_HANDLE;
The above line gives an error during CREATE PROCEDURE: SQL0104N - An unexpected token GOTO was found; expected tokens may include SET.
Thanks. Raquel.
Try GO TO as two words.
Had tried GO TO even earlier but didn't help. Anyway, thank you so much for
an earlier post on dbforms.com which helped me solve another nagging
problem I was facing for Create procedures (SQL1131N).
Regards,
Raquel. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dagwood |
last post by:
Good morning:
At least it's morning where I am. :)
I have a rather newbie question I'm afraid. I have VisualStudio.NET, and
have installed it along with SQL server. However I can't seem to find an
administration front-end to SQL, other than the VisualStudio, which is
ok for creating databases and adding tables/columns. However when I go
to generate create script, I'm told that I need client tools.
|
by: Ken Lindner |
last post by:
I have a need to become familiar with SQL Server 2000 for work.
Needless to say I am new to SQL Server any version, but not IT in
general. My employer has provided me with the SQL Server 2000
Personal disk from the SQL Server 2000 Enterprise kit as this is
reported here on the MSDN web site to be the version that is supported
on Windows XP. In fact so many of you kind people confess to having
succeeded in doing it.
I have tried...
|
by: Grim Reaper |
last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have
never setup a server from the beginning, so I am a little new at creating
server groups.
Alright, I am trying to create a server group. I right click on the "SQL
Server Group" and make a name of "TEST" and put in the subgroup of "SQL
Server Group".
Next, I try to register the "TEST" server group. I right click on the "TEST"
server group and New Server Group...
|
by: AlessanBar |
last post by:
Hello Friends !!
I have a strange problem, and I need to know what would be the source of
this. I have a laptop computer with the following configuration:
Pentium III
Brand : Toshiba
Speed : 500 Mhz
RAM : 192 MB
Hard Disk : 6 GB
|
by: Peter |
last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server
2005 Express, but get the following error in the error log.
Please could someone help me....
Microsoft SQL Server 2005 Express Edition x86:
Component Microsoft SQL Server 2005 Express Edition x86 returned an
unexpected value.
***EndOfSession***? Microsoft SQL Server 2005 Express
Edition x86: Component Microsoft SQL Server 2005 Express Edition x86
returned an...
| |
by: datapro01 |
last post by:
I am a DB2 DBA that has been asked to become familiar enough with SQL
Server in order to become actively involved in its installation,
implementation, and to review database backup/recovery procedures. SQL
Server will be used by a vendor packaged application.
The problem is that we are awaiting word on whether it will be SQL
Server 2000 or 2005 we will be working with. I have been told that
there are considerable differences between the...
|
by: Jeremy S. |
last post by:
I'm about to install VS.NET 2005 and SQL Server 2005 on a new/clean
development machine (XP Pro/SP2 etc).
Is the order of installation important (i.e., which product should I install
first)?
Thanks!
|
by: amjad |
last post by:
how to connection sql server table with aspx like pulling data from table to
grid view.... simple example to start ....
thanks
|
by: Fuzzydave |
last post by:
I am back developing futher our Python/CGI based web application run by
a Postgres DB
and as per usual I am having some issues. It Involves a lot of Legacy
code. All the actual
SQL Querys are stored in the .py files and run in the .cgi files. I
have the problem that I
need to construct a row from two seprate SQL Querys, I have tried
combining the two
Querys but all that does is create a Query that returns nothing after a
long period...
|
by: Developer |
last post by:
Hello All,
i have recently installed VS2005 and was trying to install SQL sever
2000.
I have Win XP' SP2. But when I tried installing, it only installed
client tools and not the database.
Can anyone please help me with this as I want to install SQL server and
also wouold be grateful, if you can suggest me any workaround to
dealwith this problem.(Like should I install any new OS etc).
Any help would be appreciated.
|
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: 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 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: 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: 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
| |