Thanks, I have investigated deeper, and actually the probleme comes from a middleware layer we had to develop in order to be able to use the Odbc bridge with OJB (this driver is no more supported since 1.0.1 as OJB does not respect the constraint of accessing the result set columns in the same order as in the query).
The layer we implemented is actually a proxy on ResultSet which reads and caches all the columns from the result set. But till now everything was ok, as we retrieved the data using ResulSet.getObject, but this method does not fit with Blob : we have to use getBinaryStream. So, the problem is in our code (even if this code had been to be implemented because of an OJB restriction / regression) Jacques > -----Message d'origine----- > De : Thomas Dudziak [mailto:[EMAIL PROTECTED] > Envoy� : mercredi 18 mai 2005 20:57 > � : Jacques Desmazieres > Objet : Re: Blob : using Blob with Oracle / SqlServer - MSDE / HsqlDB > > > > > The type in SQL Server should be IMAGE, but this depends on the JDBC > > > driver that you use. For jTDS this will work because it maps BLOB to > > > IMAGE. > > I also have an "external" constraint to use the Sun's JDBC-ODBC > bridge and I > > cannot find how to map the SQL Image data type to my Java Blob > data type. > > During execution the driver raises a "[ODBC SQL Server > Driver]Invalid SQL > > data type], SQL code [S1004]" while try to map IMAGE to Blob, > either IMAGE > > to LONGVARBINARY ! > > Hmm, tough luck there, the jdbc-odbc bridge is probably the worst > choice for sql server. Anyway, you might want to check out whether the > queries that OJB creates work at all by using ODBC directly, e.g. from > a Perl script or a VB program. > > A quick look into the MSDN also produced this sample that might > be of interest: > > http://support.microsoft.com/default.aspx?scid=kb;en-us;298493 > > Tom > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
