Re: [Mysql-cocoa-users] Inserting and getting blobs
Brought to you by:
sergecohen
|
From: Serge C. <co...@em...> - 2002-07-23 15:06:51
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello again;=0D =0D About blob the best is to put them in a NSData, use the method =0D prepareBinaryData: from MCPConnection to transform it into a string (you = =0D still should make the single quotes yourself) that you can insert into a = =0D query (obviously insert or update...).=0D =0D To get it back, it just should work ok. In a row, a blob is put in a =0D NSData; so you should be able to use directly as input to one o the =0D NSImage init method.=0D =0D Indeed I'm very interested on the result, I've done only a very small =0D= test on both inserting blob using NSData and prepareBinaryData:, and =0D getting a NSData from a DB blob.=0D =0D Serge.=0D =0D =0D Le jeudi 18 juillet 2002, =E0 12:13 , Jerome Rabas a =E9crit :=0D =0D > Does anybody know how to insert/get blobs from the DB?=0D >=0D > My problem is that I have a NSImage and I want to insert its content = in =0D > the DB and, then, be able to get it.=0D > What conversion should I do? (converting to NSData, and then?)=0D >=0D >=0D > Thanks.=0D >=0D >=0D > Jerome.=0D >=0D >=0D >=0D > -------------------------------------------------------=0D > This sf.net email is sponsored by:ThinkGeek=0D > Welcome to geek heaven.=0D > http://thinkgeek.com/sf=0D > _______________________________________________=0D > Mysql-cocoa-users mailing list=0D > Mys...@li...=0D > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE9PXEmMygj1Wmx00YRAkXbAJ4ji6AwVd8WMrge5niUU9KPhdqJrgCeJ/6F tdinAH4SvLGJDYeCIzbxwRk=3D =3DrokP -----END PGP SIGNATURE----- |