blob

BLOB in MySQL view instead of the proper data

Hi, I created a MySQL view using UNION ALL from two tables so that I would get the same column names for the same data in those tables (i.e. tbl1.author2 AS translator ... tbl2.translator AS translator) and so on, the problem is when I try to select something from that view, half of the data comes out as BLOB, instead of the original val...

Open file stored in SQLite as blob.

As the title, I create a ByteArray to store the file in blob like this: byte[] red_buf = myCursor.getBlob(1); And I wanna use FileOutputStream to open. But I don't know how to do. Can anyone give me a example or website please ?? ...

pysqlite - how to save images.

Hello, I need to save an image file into sqlite database in python. I could not find a solution. How can I do it? Thanks in advance. ...

Insert binary file in SQLite database with Python

I trying to write a simple Python script that inserts .odt documents into an SQLite database. Here what I have so far, but it doesn't seem to work: f=open('Loremipsum.odt', 'rb') k=f.read() f.close() cursor.execute="INSERT INTO notes (note) VALUES ('%s')" %(sqlite.Binary(k)) cursor.close() conn.close() I don't get any error messages, ...

What should I store in my blob field?

I try to use blobs as little as possible. When possible I replace blobs by a link to a file. I can only think of a few times that I needed a blob. I used to put zipped pickled python objects in there, but I use mongo or couchdb these days for that. One thing I still use it for is to store wkb (gis) objects. This made me wonder, what do o...

How can i store and retrieve images from a database?

I am creating a website as a mini project which will be used to sell various products. In the website i intend to give detailed info about the products which will be retrieved from the database. I am using Servlets and JSP as the serverside and pointbase DB. So i'll be using JDBC to connect to the DB. Please tell me how insert images int...

MS Access 2007 Blob Image export?

I have a MS Acccess 2007 database where we have inserted jpg images as blobs. I am looking for a tool that can export these images to MS SQL Server database. Any advice will be appreciated. Rob ...

Delphi 2010 - IBX - UTF8 - dbmemo problem

I am migrating an application from Delphi 6 - IBX - Firebird 1.5 that works great to Delphi 2010 - Firebird 2.1 - UTF8 database. The problem is that if I use a TDBMemo to display data from a BLOB I get the following error: Debugger Exception Notification Project accedo.exe raised exception class EAccessViolation with message 'Ac...

How do I store a zip file in MySQL?

I want to write a program which will backup an entire drive in a MySQL server using java, but I am confused. How do I create the table (what data types?), how do i insert the row like what should be the primary key, and what should be the max size of each file be? If you have any suggestion please help me out. Thank you for sparing yo...

Storing byte array in MySQL Blob with VBA

Anybody have some VBA code that will store a byte array into a MySQL blob column? ...

Writing blob from SQLite to file using Python

Hello, A clueless Python newbie needs help. I muddled through creating a simple script that inserts a binary file into a blog field in a SQLite database: import sqlite3 conn = sqlite3.connect('database.db') cursor = conn.cursor() input_note = raw_input(_(u'Note: ')) input_type = 'A' input_file = raw_input(_(u'Enter path to file...

Oracle clob over dblink with different charset

Hello, Here is the scenario: Oracle A: charset WE8ISO8859P1 Oracle B: charset WE8MSWIN1252 Oracle A <- dblink -> Oracle B I can't access Oracle B directly, firewall issues :( I have to get some binary files from OracleB and these files are in a column of type CLOB (don't ask me why and I can't change to BLOB). I'm using a "select ...

Remote image file to sqlite blob in PHP?

I have an image file stored on a remote server. I only have HTTP access to the server, so I'm getting its content using file_get_contents(URL) I need to store this content in a local sqlite3 database in a field of type 'blob'. I'm using the PDO object to connect to the database, and I'm using $db->exec("INSERT INTO myTable (myImageBlo...

Assign the contents of a blob field to combobox items

Hi I have list of country names or other strings in a text blob field. When I read the field, I get a string back with LfCr between the words or phrases. Is there an easy way to assign this string to the Items property of a TComboBox? I'm using TADOQuery on a FireBird 2.1 Database. Regards, Pieter ...

Set up git so the repository only contains the latest of certain blob files

Is there away to make git only retain the most recent version of certain blob files without keeping any history on the blob? I have a huge data set that my project relies on, but no one cases about the history of it only that it is part of the project and that they are useing the most recent data set. Thanks. ...

MySQL BLOB field INSERT syntax

Hi I'm writing a network server program in C++ which receives binary packets from network. Packets are then stored in std::vector< unsigned char > I've used MySQL 5.1 and MySQL Connector/C++ from ubuntu lucid to store packet information (field by field) into a table in a database. However, I also need to store the complete binary form ...

Getting 'attachments' out of MySQL BLOB fields, and into the filesystem

I have a standard LAMP server, and currently there is a way to attach/upload PDF's, or JPEG's with an inventory record. I designed this system way back in 1999/2000, and it has of course grown fairly large in size. The table that holds the attachments is approaching 10GB, which has made working with the data somewhat slow (especially w...

Convert BLOB into TEXT with foreign characters

I have a blob which holds HTML in it. Some of this HTML has foreign characters (ie: æ, ø, etc). I want to convert the BLOB into TEXT. I am using latin1 for my tables and changing this is not an option. From what I can tell, if if I store the foreign characters in TEXT, it is converted into something like ASCII. But if you store it in BLO...

Read a few megabytes from a BLOB in Oracle

I wish to extract a sub-BLOB (a few MBs) from a BLOB in Oracle. The question "read first 1kb of a blob from oracle" doesn't help me, since I need to get more bytes than DBMS_LOB.SUBSTR can give me (it returns RAW, which supports only a few thousand bytes). ...

ASP MVC 2 Uploading file to database (blob)

Hi, I am trying to upload a file via a form and then save in in SQL as a blob. I already have my form working fine, my database is fully able to take the blob and I have a controller that take the file, saves it in a local directory: [AcceptVerbs(HttpVerbs.Post)] public ActionResult FileUpload(int id, HttpPostedFileBase uploadF...