473,396 Members | 1,938 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,396 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 1921
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
0
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...
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
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,...

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.