473,409 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

kinterbase and stored procedure

Hallo everybody using kinterbase,

I' relative new to DB and python, so forgive if the
questions is stupide.

I'm trying to write the declaration of a SP to the server in
the way:

SPSETUP = \
"SET TERM !!;
" CREATE PROCEDURE MYPROC
AS ..."

cursor = kinterbasdb.connect(...)
cursor.excute(SPSETUP)

But it seems that anything has problems with "SET TERM !!"
expression . If I use the DB SQL console, everything seems
to be OK (the proc is setup)

''' kinterbasdb.ProgrammingError : (-104,
'isc_dsql_execute_immediate: Dynamic SQL Error. SQL error
code = -104. Token unknown - line 1, char 4. TERM. ') '''
Any help is very welcome ...

Regards
Alexander
Jul 18 '05 #1
2 1924
cursor = kinterbasdb.connect(...)
cursor.excute(SPSETUP)

But it seems that anything has problems with "SET TERM !!" expression
. If I use the DB SQL console, everything seems to be OK (the proc is
setup)


Yes, that is true. The "SET TERM" command is not really a command that
is processed by the backend.
Please note that the terminator is used to separate commands. However,
you will (normally) execute only one
command at a time with "cursor.execute". So you should create your
procedure without the "SET TERM".
InterBase will surely know that this is only one command. You can try to
run the "SET TERM" command
in a separate "cursor.execute", but probably that is not needed. I had
the same problem with Oracle triggers
before - you must not place the ending "/" character when createing
Oracle triggers from your own program.

Please let me know if it helps.
Best,

Laci 2.0
Jul 18 '05 #2
Gandalf schrieb:
cursor = kinterbasdb.connect(...)
cursor.excute(SPSETUP)

But it seems that anything has problems with "SET TERM !!" expression
. If I use the DB SQL console, everything seems to be OK (the proc is
setup)

Yes, that is true. The "SET TERM" command is not really a command that
is processed by the backend.
Please note that the terminator is used to separate commands. However,
you will (normally) execute only one
command at a time with "cursor.execute". So you should create your
procedure without the "SET TERM".
InterBase will surely know that this is only one command. You can try to
run the "SET TERM" command
in a separate "cursor.execute", but probably that is not needed. I had
the same problem with Oracle triggers
before - you must not place the ending "/" character when createing
Oracle triggers from your own program.

Please let me know if it helps.


Thanks a lot, that is the solution.
Jul 18 '05 #3

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

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
4
by: marc | last post by:
I've been developing a stored procedure that uses a user defined function in the query portion of the procedure. However, since the end product needs to allow for dynamic table names, the UDF will...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
3
by: kd | last post by:
Hi All, How to debug a stored procedure? Thanks, kd
1
by: ILCSP | last post by:
Hello, I'm trying to accomplish 3 things with one stored procedure. I'm trying to search for a record in table X, use the outcome of that search to insert another record in table Y and then exec...
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
0
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
agi2029
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,...
0
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...

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.