EQ cannot view trigger

72 views
Skip to first unread message

Tze

unread,
Apr 11, 2012, 3:56:33 AM4/11/12
to Execute Query
I'm using EQ with an underlying Oracle database. I was having a bit of
problem with creating triggers. At the end I managed to create the
triggers using DBVisualizer but when I try to view the triggers in EQ,
I get the following error:

"Error retrieving table data" and the stack shows:

java.sql.SQLException: ORA-00942: table or view does not exist
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at
oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:
801)
at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:
1039)
at
oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:
841)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:
1134)
at
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:
1274)
at
org.executequery.databaseobjects.impl.AbstractDatabaseObject.executeQuery(AbstractDatabaseObject.java:
362)
at
org.executequery.databaseobjects.impl.AbstractDatabaseObject.getData(AbstractDatabaseObject.java:
341)
at
org.executequery.gui.browser.TableDataTab.setTableResultsPanel(TableDataTab.java:
136)
at org.executequery.gui.browser.TableDataTab.access
$200(TableDataTab.java:51)
at org.executequery.gui.browser.TableDataTab
$1.construct(TableDataTab.java:96)
at org.underworldlabs.swing.util.SwingWorker$2.run(SwingWorker.java:
130)
at java.lang.Thread.run(Unknown Source)

It says table or view does not exist but I am sure the table mentioned
in my triggers do exist. Am I missing something or is there a general
problem with EQ when it comes to triggers?

Takis Diakoumis

unread,
Apr 11, 2012, 9:49:29 AM4/11/12
to execut...@googlegroups.com
hi

to create triggers, procedures and functions from the editor it is
sometimes better to use the 'execute as single statement' option from
the popup menu. this isn't very clear unfortunately and i aim to add
this method of execution as a toolbar item with a shortcut.

the reason for this is because EQ attempts to split a block of text
into multiple queries (as applicable) in order to execute these
individually and provide more informative feedback on a per query
basis. it uses the semi-colon as the delimiter and because this char
is often in creating a proc or trigger it sometimes fails to pick up
that you are creating a trigger/proc or similar. executing as a single
block sends the entire contents of the editor as-is to the db.

that said, i did just create a procedure and a trigger against oracle
by using the normal execution and it worked fine. EQ does attempt to
differentiate between a create procedure|function|trigger so as not to
split the query and this is the first test performed before execution.
i guess this needs a bit of a tweak and i will try other samples to
iron out any bugs.

the error you presented has nothing to do with the contents of your
trigger. because EQ is a database agnostic tool, some systems will
return whatever values are available for an execution of select * from
object_name - irrespective of whether this object is a table or
sequence or whatever else. EQ attempts to provide as much of this info
as is available. i have recently modified this to just print a simple
message on the pane instead of the obtrusive dialog and this will be
available in the upcoming release. the dialog is rather loud and
annoying and has been removed.

i hope this helps clarify a little. please don't hesitate to post anything else.

thanks
Takis

--
http://executequery.org

Tze

unread,
Apr 12, 2012, 5:14:29 AM4/12/12
to Execute Query
Hi Takis,

Thanks for your reply. I did use use the 'execute as single statement'
option when tried to create the trigger. However, there were a couple
of errors in my initial script so EQ refused to create the trigger.
Unfortunately, EQ doesn't really explain why the operation failed.

With DBVisualizer, it created the trigger even with errors in the
script. However, my app fell over during runtime with invalid trigger
message.

At the end I had to use the heavy weight Oracle SQL Developer. That's
how I found the mistakes in my script when I compiled it. After
correcting my script and trigger created. My app ran successfully with
the trigger kicking in doing what it should. However, I still cannot
use EQ to view the trigger and I get the same SQLException as
described in my initially post.

Anyway, I've done what I needed to do so there is no need to pursue
any further. We don't use triggers very often so I will stick to using
EQ as my DB tool.

Thanks again for taking time to respond.
Tze
Reply all
Reply to author
Forward
0 new messages