Martin wrote:

> my real problem is indeed the handling of the 
> DATE type across, yes, ODBC. 

Alright then, type

           open 'odbc'
           
and find the definition of  SQL_SUPPORTED_NAMES  (it's on line 1892).  Add a 
line thus:  

        SQL_SUPPORTED_NAMES=: (];._2) 0 : 0
        0 NB. SQL types            C default type           Into J as     Bytes 
Conversions
        ...
        SQL_DATE=: 91              NB. SQL_C_DEFAULT        SQL_C_CHAR    8     
]
        )

Then, find the block of conversion functions which begin with  getchar=:  on 
line 627.  Add among them this line:

        getdate=: datchar&.>

Now save.  Now:

           load'dd'
           ch =: ddcon'dsn=jdata'
           sh =: 'select HIRE_DATE from EMP' ddsel ch
           ddfet sh,_1
        +----------+
        |1977-06-01|
        +----------+
        |1987-07-15|
        +----------+
        |1982-08-07|
        +----------+
        |1988-01-15|
        ...

Feel free to play around with these definitions.  For example, try  91['*'  and 
use  ddfch  , or change  getdate  to produce 3
integers instead of a string, etc.

Earlier you asked:
> How can I access the "more error info available" ?

I believe the error message:

           dderr''
        ISI09 Unsupported data type - more error info available (2)

Indicates that you should call  dderr  again, with a RHA of  2  :
        
           2 dderr ''
        +---------+---------+--------+--------------------+
        |ColNumber|ColName  |TypeCode|SqlType             |
        +---------+---------+--------+--------------------+
        |1        |HIRE_DATE|91      |**JDD UNKNOWN TYPE**|
        +---------+---------+--------+--------------------+

-Dan       

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to