work-around: The JDBC driver does not show columns of some tables
work-around: The JDBC driver does not show columns of some tables
- Subject: work-around: The JDBC driver does not show columns of some tables
- From: OC <email@hidden>
- Date: Mon, 02 Mar 2015 19:57:15 +0100
Just in case someone sooner or later bumps into the same problem -- this still does not work, but meantime I've found work-around, based on extremely ugly and completely unportable fetches like
select t0."COLUMN_NAME" from information_schema.columns t0, information_schema.tables t1 where t1."TABLE_NAME"='DB_RECORD_GROUPING' and t1."TABLE_PK"=t0."TABLE_PK"
Well extremely ugly and completely unportable it might be, but it works.
On 2. 3. 2015, at 3:34, OC <email@hidden> wrote:
> Hello there,
>
> well I have found the reason why EOAdaptorChannel.describeModelWithTableNames gives me wrong results -- empty attribute sets -- for some tables: since the JDBC driver does that, too.
>
> Has perhaps anyone the slightest idea what the darn might be culprit and how to fix the problem?
>
> Thanks a big lot,
> OC
>
> ===
> 110 /tmp/jdbc> sw_vers
> ProductName: Mac OS X
> ProductVersion: 10.8.5
> BuildVersion: 12F45
> 110 /tmp/jdbc> java -version
> java version "1.7.0_13"
> Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
> Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
> 111 /tmp/jdbc> fbversion
> Available FrontBase versions:
> * 64 1: 7.2.18
> 2: 7.2.15
> 112 /tmp/jdbc> ls -l ~/Library/Java/Extensions/frontbasejdbc.jar
> -rw-r--r--@ 1 ocs staff 167820 2 bře 01:44 /Users/ocs/Library/Java/Extensions/frontbasejdbc.jar
> 113 /tmp/jdbc> md5 ~/Library/Java/Extensions/frontbasejdbc.jar
> MD5 (/Users/ocs/Library/Java/Extensions/frontbasejdbc.jar) = ed8ff45cbf7647f1549c0683ed9f4daa
> 114 /tmp/jdbc> <db.groovy
> import java.sql.*
>
> Class.forName('com.frontbase.jdbc.FBJDriver')
> Connection conn=DriverManager.getConnection('jdbc:FrontBase://localhost/PROBOIS/user=FINServis/isolation=serializable/locking=pessimistic',null,null)
> DatabaseMetaData dmd=conn.metaData
> Set show=['DB_RECORD_GROUPING','TA_AUCTION','T_PHOTO_ITEM','T_MARKET_FORM_PROTOTYPES']
> ResultSet tables=dmd.getTables(null,'FINServis',null,['TABLE'] as String[])
> while (tables.next()) {
> def name=tables.getString(3)
> if (name in show) { // so as the list is not toooooo long
> println "--- table '$name'"
> ResultSet cols=dmd.getColumns(null,null,name,null)
> while (cols.next()) println "- '${cols.getString(4)}'"
> }
> }
> println '--- done'
> 115 /tmp/jdbc> groovy db
> --- table 'T_PHOTO_ITEM'
> - 'C_AUCTION_ID'
> - 'C_PHOTO'
> - 'C_CREATION_DATE'
> - 'C_CREATOR_ID'
> - 'C_MIME'
> - 'C_ORIGINAL_NAME'
> - 'C_TITLE'
> - 'C_UID'
> --- table 'DB_RECORD_GROUPING'
> --- table 'T_MARKET_FORM_PROTOTYPES'
> - 'C_MARKET_ID'
> - 'C_FORM_TEMPLATE_ID'
> --- table 'TA_AUCTION'
> --- done
> 116 /tmp/jdbc> /Library/FrontBase/bin/sql92
> sql92#1> connect to PROBOIS user FINServis;
> Auto committing is on: SET COMMIT TRUE;
> PROBOIS@localhost#2> show table T_PHOTO_ITEM;
> --
> -- TABLE: REBOIS.FINServis.T_PHOTO_ITEM
> --
> CREATE TABLE T_PHOTO_ITEM (
> C_AUCTION_ID INT ,
> C_PHOTO BLOB ,
> C_CREATION_DATE TIMESTAMP (6) ,
> C_CREATOR_ID INT ,
> C_MIME VARCHAR (4096) ,
> C_ORIGINAL_NAME VARCHAR (4096) ,
> C_TITLE VARCHAR (4096) ,
> C_UID INT NOT NULL ,
> PRIMARY KEY (C_UID)
> );
> PROBOIS@localhost#3> show table DB_RECORD_GROUPING;
> --
> -- TABLE: REBOIS.FINServis.DB_RECORD_GROUPING
> --
> CREATE TABLE DB_RECORD_GROUPING (
> C_COMMENT VARCHAR (4096) ,
> C_CREATION_DATE TIMESTAMP (6) ,
> C_CREATOR_ID INT ,
> C_FORM_TEMPLATE_ID INT ,
> C_IDENTIFIERS VARCHAR (99999) ,
> C_KIND VARCHAR (4096) ,
> C_TITLE VARCHAR (4096) ,
> C_UID INT NOT NULL ,
> PRIMARY KEY (C_UID)
> );
> PROBOIS@localhost#4> show table T_MARKET_FORM_PROTOTYPES;
> --
> -- TABLE: REBOIS.FINServis.T_MARKET_FORM_PROTOTYPES
> --
> CREATE TABLE T_MARKET_FORM_PROTOTYPES (
> C_MARKET_ID INT NOT NULL ,
> C_FORM_TEMPLATE_ID INT NOT NULL ,
> PRIMARY KEY (C_MARKET_ID, C_FORM_TEMPLATE_ID)
> );
> PROBOIS@localhost#5> show table TA_AUCTION;
> --
> -- TABLE: REBOIS.FINServis.TA_AUCTION
> --
> CREATE TABLE TA_AUCTION (
> C_UID INT NOT NULL ,
> C_ARCHIVATION_DATE TIMESTAMP (6) ,
> PRIMARY KEY (C_UID)
> );
> PROBOIS@localhost#6> quit;
> 117 /tmp/jdbc>
> ===
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden