Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dtp-dev] SQL Query Builder


The SQL Query Builder (formerly known as the Visual SQL Builder) is now part of the main DTP development stream and is therefore available in the DTP 1.6 nightly builds from http://www.eclipse.org/datatools/

Announcements relating to the SQL Query Builder will be made to the dtp-dev mailing list and design discussions will be carried out through the dtp-sqldevtools-dev mailing list. If you wish to see or participate in SQL Query Builder design discussions, please join this mailing list. We look forward to your input.

To run the SQL Query Builder, you should download the latest DTP 1.6 nightly build then follow the instructions below (taken from /cvsroot/datatools/HEAD/org.eclipse.datatools.sqltools/prototype/devnotes/sqlbuilder_notes.txt):

------------------------------------------------------------------------------

Notes 20071003
Nightly Build: dtp-sdk_1.6M3_N100107.zip
Tested with Eclipse 3.3, EMF 2.2.2 (EMF + SDO), GEF 3.3, as specified for
DTP 1.6 nightly builds at http://www.eclipse.org/datatools/downloads.html

Sun Java 1.4.2 VM or Sun Java 1.5 VM

Databases tested:
        ASA 10.0.1
        ASE 15.0.1
        Derby 10.2.2.0
        MySQL 5.0
        Oracle 10g Express Edition 10.2.1.0
        PostgreSQL 8.2

You need the LPG v1.1 (LALR parser generator) runtime to use the SQL Query Builder.

If you are running DTP from a build and not via the source, you should download
the LPG-V1.1 distribution from sourceforge at http://sf.net/projects/lpg and copy
        lpgjavaruntime.jar
into
        eclipse\plugins\org.eclipse.datatools.lpg_1.0.0.200706071\lpg

If you are running via the DTP source, see the file
        eclipse\plugins\org.eclipse.datatools.lpg\README.txt
This gives instructions to run a script which causes lpgjavaruntime.jar to be
downloaded from
        http://easynews.dl.sourceforge.net/sourceforge/lpg/lpgdistribution-05-16-06.zip
and put into
        eclipse\plugins\org.eclipse.datatools.lpg\lpg

The SQL Query Builder can be used to edit SQL files which have been created in the SQL File Editor.
 
To try out the SQL Query Builder:

- Create a Connection Profile
  It's best to set the database name in the connection profile
- Create a SQL file for this connection profile
  If you didn't set the database name in the connection profile, set it in the SQL File Editor via
  the Connection Profile bar at the top
- Type just SELECT (or INSERT, UPDATE or DELETE) in the SQL file then save and close it
- Open the SQL file in the SQL Query Builder. If a blank editor opens, see "Note:" below.
  You will see a message dialog "This SQL syntax is either invalid ..."
  Hit OK to dismiss the dialog
- You can now build the SQL statement in the SQL Query Builder.
  Start by right-clicking in the middle pane and run "Add Table..."  
- To run the SQL, use SQL->Run SQL on the main menu bar.

Note: If the editor is completely blank when you open the SQL File in the SQL Query Builder,
it is likely you have forgotten to get the lpg runtime. See above for how to do this.
To confirm that this is the problem, you will have this error in your workspace's
.metadata/.log file:

        !ENTRY org.eclipse.ui 4 0 2007-10-03 11:05:59.567
        !MESSAGE Unhandled event loop exception
        !STACK 0
        java.lang.NoClassDefFoundError: lpg/lpgjavaruntime/PrsStream
                at org.eclipse.datatools.sqltools.parsers.sql.query.SQLQueryParserManagerProvider.getParserManager(SQLQueryParserManagerProvider.java:192)
                at org.eclipse.datatools.sqltools.sqlbuilder.model.SQLDomainModel.getParserManager(SQLDomainModel.java:918)
                at org.eclipse.datatools.sqltools.sqlbuilder.model.SQLDomainModel.parse(SQLDomainModel.java:945)
                at org.eclipse.datatools.sqltools.sqlbuilder.model.SQLDomainModel.openFileResource(SQLDomainModel.java:383)
                at org.eclipse.datatools.sqltools.sqlbuilder.SQLBuilder.init(SQLBuilder.java:484)
                at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:794)
                at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:643)

----------------------------------------------------------------------------------------------

Jeremy
______________________________________
Jeremy Lindop
Sybase (UK) Limited
Telephone number +44 (0)113 2842073

Sybase (UK) Limited, Sybase Court, Crown Lane, Maidenhead, Berkshire SL6 8QZ is a company incorporated in England & Wales under company registration number 2175260.

NOTICE:  This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain confidential information and may be protected by the attorney-client privilege.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication or its attachments is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to this message and please immediately delete it from your computer.

Back to the top