You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by ooper <ma...@roomity.com> on 2006/02/15 19:25:36 UTC

Sample code using datatype *image* in SQLServer

Can someone provide some sample code for using iBatis with image data type columns in SQLServer? A result_map and a java bean would be nice, and anything else that might be helpful. We're currently running iBatis 2.0: Build Date: 2005/05/16 01:33 Build Number: 565 TIA, Brian Barnett


Broadband interface (RIA) + mail box saftey = http://iBatis_for_Java_Users_List.roomity.com
*Your* clubs, no sign up to read, ad supported; try broadband internet. 

Re: Sample code using datatype *image* in SQLServer

Posted by Larry Meadors <lm...@apache.org>.
I can't, but here is how I'd get there. :-)

Create the table and put some data in it.

Write a simple mapped statement to shove 'select * from table' into a hashmap.

Write a unit test to call that.

Use the test to log the results, and see what you get back. If it
comes back as a byte[] you are home free.

I'd guess that the image type is treated like a BLOB. If you see
something in your test that is in java.sql.Types, try creating a
result map for that column, and see what you can get back..

Larry


On 2/15/06, ooper <ma...@roomity.com> wrote:
> Can someone provide some sample code for using iBatis with image data type
> columns in SQLServer?
> A result_map and a java bean would be nice, and anything else that might be
> helpful.
>
> We're currently running iBatis 2.0:
> Build Date: 2005/05/16 01:33
> Build Number: 565
>
> TIA,
> Brian Barnett
>
>
> Broadband interface (RIA) + mail box saftey =
> http://iBatis_for_Java_Users_List.roomity.com
> *Your* clubs, no sign up to read, ad supported; try broadband internet.
>