Re: How to read ifmxmrdata using JDBC
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Data Types & Schema Design, Platform-Specific Issues, Java & JDBC Development, Versions, Editions & End-of-Life
Hi Franky, The new JDBC specification from Sun (2.0) includes support for user defined types (UDTs). This support is through a java interface and a type map system. The java, SQLData, interface must be implemented by the java class that corresponds to the sql UDT. A typemap entry must be entered into the type map of a connection to tell the JDBC driver to handle a particular UDTs with a particular java class. The JDBC driver automatically instantiates an object of the given class and executes the readSQL method to extract the UDT components from the result set stream. In the case of IFMXMRDATA type, this is a UDT and must have a corresponding java class. However, a java class has not been implemented yet for this type. There is a work around though - to explicitly cast the IFMXMRDATA type in the SQL command to an lvarchar and use the getClob method to extract the item from the result set. I would recommend using the latest GA version of the Informix JDBC driver (2.11), the documentation included details handling lvarchar types. Hope this helps, get back to me if you require some more information. Thanks, Steven jean.anderson@informix.com wrote: > > hey, Steven, as our main jdbc authority, do you want to post > a reply to all these groups? > > if not, I'll be happy to repost the snippet you posted back in > January on casting the column to lvarchar, then using getClob > to read the lvarchar column. > > -jean > > >To: idn-interest@informix.com > >Path: not-for-mail > >From: "Franky Wong" <fwong@seattletimes.com> > >Newsgroups: comp.databases.informix,informix.idn.datablade,informix.idn.informix,informix.idn.java > >Subject: how to read ifxmrdata using JDBC > >Date: Tue, 29 Feb 2000 14:56:49 -0800 > >Organization: Informix Software, Inc. > >Lines: 21 > >NNTP-Posting-Host: 192.251.220.77 > >X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 > >Sender: owner-idn-datablades@informix.com > > > >How do I read the ifxmrdata data type using JDBC? > > > >I have IDS 9.2UC1 running on Solaris 7. I tried using Informix JDBC driver > >2.0 and 1.4 on NT (both included in Informix Client SDK 2.40). But the > >getString() function returns something like: > > > > com.informix.jdbc.IfxUDT@1ee2f1 > > > >I looked into the JDBC 2.0 and 1.4 documentation and tried other getXXX() > >functions. The documentation does not mention support for web datablade > >4.00UC1 and excalbur datablade 1.30UC3 data types (e.g. html and ifxmrdata). > > > >-- > >======================= > >Franky Wong > >Senior Internet Engineer > >New Media > >Seattle Times > >http://www.seattletimes.com > >
Related threads
- the longer you surf, the MORE $$$ you earn !!
- Store procedure
- emulation for Vt100
- extent size questions again ...