Solved

TIBQuery.SQL does not understand "set term" command?

Posted on 2007-11-26
3
394 Views
Last Modified: 2012-06-27
Hello :-)

I created quite a complex stored procedure which I want to execute dynamically using TIBQuery.
Within my stored procedure I use "SET TERM ^ ; " command.

The stored procedure is correct and works fine when executed from EMS.

When executed from TIBQuery it crashes with error message which mentions "TERM"

Thank you very much :-)

panJames
0
Comment
Question by:panJames
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
developmentguru earned 500 total points
ID: 20349873
Show the SQL that you place in the TIBQuery to execute your stored procedure.  It should look something like:

Exec MyStoredProc

  I know that SET TERM can't be used everywhere.  If you are attempting to use the code of your stored procedure, verbatim, inside your TIBQuery then it likely will not work.  If you are calling the stored procedure correctly using your TIBQuery then The stored procedure would need to be looked in to.  In order to determine the problem it would help to see how it is called and the stored procedure itself.

  Without seeing any of that I can only say that you could fall back on some old fasioned debugging techniques.  You could use Binary Deconstruction on your stored procedure to see if something inside your procedure is causing the error.  Comment out half of it and see if the error still happens (last half).  If it does then comment out the last half of what is left, etc until the error does not happen.  If you are able to comment out all of the code and the error still happens then something must be wrong with how it is being called... perhaps a component update is needed... Until more testing is done (or more code shown) it will be difficult to be any more help.

Let me know.
0
 

Author Comment

by:panJames
ID: 20350272
This is DDL query and starts this way:

SET TERM ^ ;
CREATE PROCEDURE ABC (

and it looks like TIBQuery does not like
"SET TERM"

panJames
0
 

Author Comment

by:panJames
ID: 20350585
I think I solved this problem.

TIBQuery.ParamCheck := False;

and simple do not use 'SET TERM' at all.

Now it works fine.

panJames
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question