martinrybak / SQLClient

Native Microsoft SQL Server client for iOS
http://objcsharp.wordpress.com/2013/10/15/an-open-source-sql-server-library-for-ios/
MIT License
124 stars 51 forks source link

Solved Issue #17: Fetching image data #21

Closed aksh1t closed 9 years ago

aksh1t commented 9 years ago

Solved Issue#17.

The buffer size for IMAGE data (type = SYBIMAGE) was too small and used to cause buffer overflow error. On searching the documentation on FreeTDS, I found this: http://www.freetds.org/userguide/samplecode.htm#AEN6127

Check out the second item in Notes at the end. It says we need double buffer for SYBIMAGE type. And I added the conversion from hexadecimal array to UIImage at the end, so that the value will be a UIImage.

martinrybak commented 9 years ago

Thanks!