Well, I checked it out, and it appears that, in your case, the drivers
should be using getColumn:
ResultSetMetaData meta = getMetaData();
String string = null;
switch (meta.getColumnType(position)) {
case (Types.CLOB):
try {
string = readClob(rset.getClob(position));
} catch (IOException e) {
throw new JspTagException(e.toString());
} catch (SQLException e) {
throw new JspTagException(e.toString());
}
break;
default:
string = rset.getString(position);
}
So, if the column type is undefined (as in the case of the memo field),
then the getColumn() method is called.
You could try sending a stack trace to the list. Maybe the specific
exception will help.
- Morgan
On Mon, 11 Jun 2001, Morgan Delagrange wrote:
> Ah, that's interesting. If memo fields don't return one of the standard
> JDBC constants, that might cause unpredictable behaviour. Let me take a
> look see and make sure that it will default to getColumn().
>
> On Fri, 8 Jun 2001, Yiyi Sun wrote:
>
> > As I said we cannot use DBTags with jdbc-odbc. I think that's a problem of
> > the driver. jdbc-odbc bridge too. The getColumnType() returns -1 on my memo
> > field.
> >
> > Yiyi
> >
> > > Hmm, doesn't sounds quite right. The getColumn tag only uses the
> > > getClob() method for CLOB data types; in all other cases, it uses
> > > getString(). This sounds like a driver issue, but I can't be certain.
> > >
> > > On Tue, 5 Jun 2001, Yiyi Sun wrote:
> > >
> > > > Hi Morgan,
> > > >
> > > > The memo type is very useful to store the large text. I used to use the
> > > > getString(...) method of the Statement class to read memo fields while
> > using
> > > > the jdbc-odbc bridge and MS Access.
> > > >
> > > > I found in the source that the GetColumnTag class uses JDBC 2.0's Clob
> > class
> > > > . In JDK1.3 and beofore, the jdbc-odbc bridge is only JDBC 1.1. In
> > JDK1.4
> > > > the bridge will be JDBC 2.0 that could support Clob. Until the finaly
> > > > release of JDK1.4 in Q4 of this year, it seems that we cannot use DBTags
> > > > with jdbc-odbc.
> > > >
> > > > Is it right?
> > > >
> > > > Cheers!
> > > >
> > > > Yiyi
> > > >
> > > >
> > > >
> > > > > I've never heard of the memo type. Have you successfully accessed
> > memo
> > > > > fields with JDBC drivers? If so, how did you do it?
> > > > >
> > > > > It's possible that memo fields are not supported by your JDBC drivers.
> > > > >
> > > > > On Sat, 2 Jun 2001, Yiyi Sun wrote:
> > > > >
> > > > > > Hi All,
> > > > > >
> > > > > > When I am using DBTags with jdbc:odbc and MS Access database, the
> > > > > > <sql:getColumn ... /> Tag raises java.sql.SQLException if the fields
> > to
> > > > be
> > > > > > read are of memo type.
> > > > > >
> > > > > > Any workaround or suggestion? Thanks
> > > > > >
> > > > > > Yiyi
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >
>
>