• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Storing pictures in database ...how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Storing pictures in database ...how?


  • Subject: Storing pictures in database ...how?
  • From: leszek <email@hidden>
  • Date: Mon, 17 Nov 2003 13:48:50 +0100

Hi,
I'm trying to store pictures in MySQL (using SMySQL.framework) with no success. My code looks like:

(...)
props = [NSDictionary dictionaryWithObjectsAndKeys:@"0.65",@"NSImageCompressionFactor",nil];
myNSData = [bitmap representationUsingType:NSJPEGFileType properties:props];
(connecting etc.)
myQuery = [NSString stringWithFormat:@"insert into fota (foto) values ('%@');",[myConnection prepareBinaryData: myNSData]];
myResult = [myConnection queryString:myQuery];

...and nope, what's wrong with my code?

Any help greatly appreciated. Thanks in advance.

Leszek Nie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Storing pictures in database ...how?
      • From: Moray Taylor <email@hidden>
  • Prev by Date: Re: Strange characters in Toolbar
  • Next by Date: Re: Strange characters in Toolbar
  • Previous by thread: Re: Strange characters in Toolbar
  • Next by thread: Re: Storing pictures in database ...how?
  • Index(es):
    • Date
    • Thread