[Mysql-cocoa-users] Hello! Anybody?
Brought to you by:
sergecohen
|
From: leszek <le...@ev...> - 2003-11-18 22:32:40
|
Hi,
I'm writing COCOA app with SmySQL and I need to store some JPEGS in
blob field.
I tried this code:
(...)
mini = [bitmap representationUsingType:NSJPEGFileType properties:nil];
(...)
if ([conn isConnected]) {
[conn selectDB:@"test"];
sql = [NSString stringWithFormat:@"insert into fota (foto)
values ('%@');",[conn prepareBinaryData:mini]];
[polaczenie queryString:sql];
...and data looks truncated (bad Huffman code - says mysql).
What's is going wrong? Data in 'mini' are correct - test procedure can
render image in ImageView - from database - no way!
Any help will be appreciated.
regards
Leszek Nie
|