Devart Forum Index

The time now is Thu 09 Sep 2010 12:47

SET TERM doesn't work as expected?

 
Post new topic   Reply to topic    Devart Forum Index -> InterBase Data Access Components
View previous topic :: View next topic  
Author Message
upscene



Joined: 19 Oct 2006
Posts: 157

PostPosted: Thu 28 Jan 2010 08:34    Post subject: SET TERM doesn't work as expected? Reply with quote

A test of mine is reporting the following:

when running the following script against a Firebird database:

Code:
SET TERM ^^ ;
CREATE PROCEDURE S_GET_VERSION2 returns (
   MAJOR_VERSION SmallInt,
   MINOR_VERSION SmallInt,
   LAST_SCRIPT_NUMBER Integer,
   LAST_SCRIPT_FILE VarChar(255)) AS
BEGIN
   SUSPEND;
END ^^


I get the following error message:

Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column 5
TERM



Please fix.
Back to top
View user's profile Send private message
Plash
Devart Team


Joined: 10 May 2006
Posts: 2844

PostPosted: Thu 28 Jan 2010 12:09    Post subject: Reply with quote

You should use TIBCScript if you execute a script with several commands.
Back to top
View user's profile Send private message Visit poster's website
upscene



Joined: 19 Oct 2006
Posts: 157

PostPosted: Thu 28 Jan 2010 12:14    Post subject: Reply with quote

Plash wrote:
You should use TIBCScript if you execute a script with several commands.


Of course, I understand that, which is exactly what I'm doing.

That is, I'm using TIBCScript in combination with a TIBCQuery via the .Dataset property of the script component.

It seems you're passing the SET TERM to the Dataset and to the server?

That would be an error on your part. Wink
Back to top
View user's profile Send private message
Plash
Devart Team


Joined: 10 May 2006
Posts: 2844

PostPosted: Thu 28 Jan 2010 14:03    Post subject: Reply with quote

We could not reproduce the problem. Please send to support*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.
Back to top
View user's profile Send private message Visit poster's website
upscene



Joined: 19 Oct 2006
Posts: 157

PostPosted: Mon 01 Feb 2010 09:17    Post subject: Reply with quote

Right, I figured it out --

I have a BeforeExecute event handler, SET TERM is passed to that with "Omit = True", in my handler, I was setting that to False if it's not something specific that I'm checking.

It seems that you check -before- doing the event.

Perhaps these two should be switched around as the current behaviour allows the programmer to override your behaviour on these specific occasions.


Hope this helps.
Back to top
View user's profile Send private message
Plash
Devart Team


Joined: 10 May 2006
Posts: 2844

PostPosted: Tue 09 Feb 2010 13:27    Post subject: Reply with quote

We have fixed this problem. The fix will be included in the next build of IBDAC.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Devart Forum Index -> InterBase Data Access Components All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum