Image data corruption in the Postgre

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Image data corruption in the Postgre

박승호
Samsung Enterprise Portal mySingle  

Hello

I am developing a ODBC application(Windows and Unix) and I met a problem on Linux version.

When I get the image(bytea) data from postgre DB (7.3) the Image data was corrupted.

I used the ODBC API

m_rc = SQLGetData(m_hstmt, (RQWORD)index, cType, lpOutData, MAX_LONGDATA_FOR_ACCESS, &nColLen);

 

on the Windows with iODBC Driver, it was OK.. so.. I trace the lpOutData.

When I saved to file just after from SQLGetData, unixODBC driver saved a corrupted image(image.bmp).

 

What should I check?

Thank you

 

 SEUNGHO PARK
 Advisory Engineer / EasyBase Team
 SAMSUNG SDS CO., LTD.
 Tel: +82-2-6484-0497

 E-mail: [hidden email]


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mail.easysoft.com/mailman/listinfo/unixodbc-support

image_win.bmp (16K) Download Attachment
image.bmp (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Image data corruption in the Postgre

Nick Gorham
박승호 wrote:

> N촱뇊ⅹ作) em�h혏hi�쥄^솴
>
>------------------------------------------------------------------------
>
>_______________________________________________
>unixODBC-support mailing list
>[hidden email]
>http://mail.easysoft.com/mailman/listinfo/unixodbc-support
>

Hi,

I think something has got lost in character set conversion :-)

--
Nick Gorham
Easysoft Limited
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mail.easysoft.com/mailman/listinfo/unixodbc-support