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

Inserting UIImage files #56

Closed fuzunspm closed 6 years ago

fuzunspm commented 6 years ago

If it's possible, how should i insert UIImage files converted to Data type into sql table? (i mean what kind of query should be used here)

martinrybak commented 6 years ago

You should be able to convert your data into a hex string and use it in an insert statement: INSERT INTO ImageTable(imageField) VALUES (CONVERT(IMAGE, 0x3C3F78...))