Hello Lukasz, to insert a picture (or any binary data for that matter), you can read the data from the file and use sqlite3_bind_blob to insert (or update) it. When selecting it from the database, use sqlite_column_blob to retrieve the data and sqlite3_column_bytes to get the length.
An alternative is to convert the binary data to a string before storing it in the database. For this you can use base64 - encoding or sonething like this. See http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob http://www.sqlite.org/capi3ref.html#sqlite3_column_blob and the sqlite3_blob* - functions. On how to design your database, that would depend on what you are planning to to and how to use the data. Perhaps you could provide more information. Hope this helps, Martin lukasz p. wrote: > Hi. > I would like to write an application wich helps me to manage with my cd/dvd > collections. It will scan all files on cd/dvd add it to a datebase and it > could also insert pictures (cd/dvd covers). My questions are: > - is there any possiblity to add in sqlite datebase pictures like gif, jpg ? > - how to design datebase to scan cd/dvd and make tree layout (Folders, files > etc.) ? > Thx for any sugestions. > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users