cool...thanks for the info!

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Dieter Wimberger
> Sent: Thursday, March 09, 2000 7:28 AM
> To: Turbine
> Subject: Re: DBSybase implementation
>
>
> Well I doubt that this is really true, because the Driver
> obvioulsy conforms
> to the standard. Therefore it has to implement the complete java.sql.*
> including metadata.
>
> Here is a hint from the original Documentation comming with jConnect:
>
> Accessing Database Metadata
> ------------------------------------------------------------------------
>
>
> To support JDBC DatabaseMetaData methods, Sybase provides a set of stored
> procedures that jConnect can call for metadata about a database.
> These stored
> procedures must be installed on the server for the JDBC metadata
> methods to work.
> If the stored procedures for providing metadata are not already
> installed in a
> Sybase server, you can install them using one of two stored
> procedure scripts
> provided with jConnect:
>
> *     sql_server.sql installs stored procedures on an Adaptive
> Server database.
> *     sql_anywhere.sql installs stored procedures on a Adaptive
> Server Anywhere database.
>
> Refer to the Sybase jConnect for JDBC Installation Guide and Release
> Bulletin for complete
> instructions on installing stored procedures.
> In addition, to use the metadata methods, the USE_METADATA connection
> property must be set to "true"
> (its default value) when you establish a connection.
>
> Note
> ------------------------------------------------------------------------
> You cannot get metadata about temporary tables in a database.
> ------------------------------------------------------------------------
>
> Note
> ------------------------------------------------------------------------
> The DatabaseMetaData.getPrimaryKeys() method finds primary keys
> declared in a table definition (CREATE TABLE) or with alter table
> (ALTER TABLE ADD CONSTRAINT). It does not find keys defined using
> sp_primarykey.
> ------------------------------------------------------------------------
>
> Server Side Metadata Installation
>
> Metadata support can be implemented in either the client (ODBC, JDBC)
> or in the data source
> (server stored procedures). jConnect provides metadata support on the
> server, which results
> in the following benefits:
>
> * Maintains jConnect's small size, which ensures the driver can be
> quickly downloaded
>    from the internet.
>
> * Gains run-time efficiency from preloaded stored procedures on the
> data source.
>
>
> I didnt need it yet, but maybe somebody could verify above.
> If I have time I might check it out the next days, myself, but well.
>
> Hope that helps
> Regards
> Dieter Wimberger
>
>
> >The meta-data jdbc functions are not implemented (as pointed out in the
> >exception) in jconnect and probably will not be any time soon. I
> had tried
> >to do the same thing 3-4 months back and ran into this brick
> wall. you may
> >want to post a status request on this issue on Sybase's jconnect
> news group:
> >news://forums.sybase.com/sybase.public.jconnect
> >
> >-scott-
> >
> >
> >
> >----- Original Message -----
> >From: Hien Nguyen <[EMAIL PROTECTED]>
> >To: Turbine <[EMAIL PROTECTED]>
> >Sent: Tuesday, March 07, 2000 12:53 AM
> >Subject: DBSybase implementation
> >
> >
> >  > Hi,
> >  >
> >  > I tried to implement the
> org.apache.turbine.util.db.pool.DBSybase class so
> >that
> >  > I can use Turbine with Sybase.
> >  >
> >  > I added the following:
> >  >       public static final int DB_SYBASE     = 8;
> >  >       public static final String DRIVER_SYBASE    =
> >"com.sybase.jdbc.SybDriver";
> >  >
> >  > to DB.java under package: org.apache.turbine.util.db.pool.
> >  >
> >  > here is the code of DBSybase.java:
> >  >
> >  > package org.apache.turbine.util.db.pool;
> >  > public class DBSybase implements DB
> >  > {
> >  >     private static final int DATABASE_TYPE = DB.DB_SYBASE;
> >  >     private String url = null;
> >  >     private String username= null;
> >  >     private String password= null;
> >  >
> >  >     protected DBSybase()
> >  >     {
> >  >     }
> >  >     public Connection getConnection() throws SQLException
> >  >     {
> >  >         return DriverManager.getConnection(url, username, password);
> >  >     }
> >  >     public void init(String url, String username, String
> password) throws
> >  > Exception
> >  >     {
> >  >         this.url = url;
> >  >         this.username = username;
> >  >         this.password = password;
> >  >
> >  >         Class.forName( DRIVER_SYBASE ).newInstance();
> >  >     }
> >  >     public int getDatabaseType()
> >  >     {
> >  >         return this.DATABASE_TYPE;
> >  >     }
> >  >
> >  >     /** This method is used to ignore case */
> >  >     public String toUpperCase(String in)
> >  >     {
> >  >         return new
> >StringBuffer("UPPER(").append(in).append(")").toString();
> >  >     }
> >  >     public char getStringDelimiter()
> >  >     {
> >  >         return '\'';  // '
> >  >     }
> >  >     public String getIdSqlForAutoIncrement()
> >  >     {
> >  >         return null;
> >  >     }
> >  >     public String getSequenceSql(Object sequenceName)
> >  >     {
> >  >         return null;
> >  >     }
> >  >
> >  >     /**
> >  >      * The method is used to lock a table.
> >  >      */
> >  >     public void lockTable(Connection con, String table) throws
> >SQLException
> >  >     {
> >  >         Statement statement = con.createStatement();
> >  >
> >  >         StringBuffer stmt = new StringBuffer();
> >  >         stmt.append( "SELECT next_id FROM " )
> >  >             .append( table )
> >  >             .append( " FOR UPDATE" );
> >  >
> >  >         statement.executeQuery( stmt.toString() );
> >  >     }
> >  >     /**
> >  >      * The method is used to unlock a table.
> >  >      */
> >  >     public void unlockTable(Connection con, String table) throws
> >SQLException
> >  >     {
> >  >         // tables in Oracle are unlocked when a commit is issued
> >  >         // the user may have issued a commit but do it here
> >  >         // to be sure
> >  >         con.commit();
> >  >     }
> >  > }
> >  >
> >  > this compiles fine....but when I click on Login, tomcat threw the
> >following
> >  > exception:
> >  >
> >  > java.lang.Error: Error in BasePeer.initTableSchema(): ZZ00A:
> The method
> >  > getTableName has not been completed and should not be called.
> >  >         at
> >  >
> org.apache.turbine.om.peer.BasePeer.initTableSchema(BasePeer.java:221)
> >  >         at
> >  >
> >org.apache.turbine.om.user.peer.TurbineUserPeer.<clinit>(TurbineU
> serPeer.jav
> >a:145)
> >  >
> >  >         at
> >  >
> >org.apache.turbine.om.user.TurbineUser.retrieveFromStorage(Turbin
> eUser.java:
> >310)
> >  >
> >  >         at
> >  >
> org.apache.turbine.om.user.peer.UserFactory.getUser(UserFactory.java:108)
> >  >         at
> >  >
> org.apache.turbine.om.user.peer.UserFactory.getUser(UserFactory.java:83)
> >  >         at
> >  >
> org.apache.turbine.modules.actions.LoginUser.build(LoginUser.java:101)
> >  >         at
> >org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:115)
> >  >         at Turbine.doGet(Turbine.java:261)
> >  >         at Turbine.doPost(Turbine.java:382)
> >  >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
> >  >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> >  >         at
> >  >
> >org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrappe
> r.java:390)
> >  >         at
> >  >
> >org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrappe
> r.java:422)
> >  >         at
> >  >
> org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
> >  >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> >  >         at
> >  >
> >org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrappe
> r.java:390)
> >  >         at
> >  >
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:513)
> >  >         at
> >  >
> >org.apache.tomcat.service.http.HttpConnectionHandler.processConne
> ction(HttpC
> >onnectionHandler.java:146)
> >  >
> >  >         at
> >  >
> >org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoi
> nt.java:334
> >)
> >  >         at java.lang.Thread.run(Thread.java:479)
> >  >
> >  >
> >  > what I am doing wrong?
> >  >
> >  > Thanks,
> >  > --hqn
> >  >
> >  > __________________________________________
> >  > NetZero - Defenders of the Free World
> >  > Get your FREE Internet Access and Email at
> >  > http://www.netzero.net/download/index.html
> >  >
> >  >
> >  > ------------------------------------------------------------
> >  > To subscribe:        [EMAIL PROTECTED]
> >  > To unsubscribe:      [EMAIL PROTECTED]
> >  > Problems?:           [EMAIL PROTECTED]
> >  >
> >
> >
> >
> >
> >------------------------------------------------------------
> >To subscribe:        [EMAIL PROTECTED]
> >To unsubscribe:      [EMAIL PROTECTED]
> >Problems?:           [EMAIL PROTECTED]
>
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to