Hi,

I am using a GdkPixbuf and want to store the pixbuf created to the
sqlite3 database.Please can you tell what's wrong in code found below.

execute_sql_non_select (cnc, "CREATE TABLE IF NOT EXISTS Thumbails
(AlbumId text, ThumbData blob, ThumPath text)"); 

GdkPixbuf *thumbPixbuf;
thumbPixbuf = gdk_pixbuf_new_from_file_at_size(inPath,250,250,&err);

result = gdk_pixbuf_save_to_buffer (thumbPixbuf,str, &len, "jpeg", NULL,
NULL);

GValue* bValue  =  gda_value_new_blob(str,len);
dataValue = gda_value_new_from_string ( gda_blob_to_string
(bValue,len), G_TYPE_STRING);

res = gda_insert_row_into_table (dbConnection, "Thumbails", &error,
"AlbumId",idValue, "ThumbData", dataValue,"ThumPath", pathValue, NULL);

Thanks in advance,
Divya

-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to