The files are binary and we are using a simple version of the sqlite3 encoder from the command line to make the binary data safe for sqlite. This is working well with the smaller mp3 and wav files. When the files get over a size (i have not determined what size) the sqlite insert starts to fail. I would like some help figuring out why my insertions are failing, and if there is something I can do to get my files inserted into sqlite. Here's the sqlite table I am using CREATE TABLE tqp_stored_file ( al_user_recnum int8, caption varchar(255), connect_method varchar(40), description text, file_contents blob, file_type varchar(255), notes text, orig_file_name varchar(255), parsed_content_analysis text, rec_created_by varchar(30), rec_created_by_login_recnum int8, rec_created_date timestamp, rec_fields_xml text, rec_mod_by varchar(30), rec_mod_by_login_recnum int8, rec_mod_timestamp timestamp, rec_status varchar(20), rec_type varchar(20), recnum INTEGER PRIMARY KEY , size int8, storage_location_determined_by varchar(20), storage_location_type int8, system_file_path varchar(255), system_server varchar(255) ); From PHP I have the following: $enc_file_contents is the contents of a wav file (which is attached to this bid) $query = "INSERT INTO tqp_stored_file (al_user_recnum, caption, description, orig_file_name, file_type, file_contents, storage_location_type ) VALUES ('1','A FIle To Insert','A File To Insert','tmp_file.mp3','audio/x-wav','".$enc_file_contents."','2')"; $ret = sqlite_query($sqlite_db , $query);