4.0

4.0 | 4 ratings Rate this file 17 downloads (last 30 days) File Size: 9.14 KB File ID: #9549

Myblob

by Joerg Buchholz

 

07 Jan 2006 (Updated 09 Jan 2006)

Code covered by BSD License  

Exchange blobs (binary large objects) with MySQL databases

Download Now | Watch this File

File Information
Description

MYBLOB_DEMO - Demonstrate the use of the MYBLOB tool kit
MYBLOB_OPEN - Open the connection to a MySQL database
MYBLOB_COMMAND - Send an SQL statement to a MySQL database
MYBLOB_FROM_DB - Retrieve a blob (binary large object) from a MySQL database
MYBLOB_TO_DB - Send a blob (binary large object) to a MySQL database
MYBLOB_CLOSE - Close the connection to the MySQL database

* Install MyODBC from www.mysql.com
* Insert your own MySQL database parameters in myblob_demo.m
* Run myblob_demo

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
MySQL Database Connector
This submission has inspired the following:
myblob_testdb, Access a MySQL database

MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements MySQL Connector/ODBC (aka MyODBC) from http://www.mysql.com/products/connector/odbc/
Zip File Content  
Other Files myblob/Contents.m,
myblob/matlab.jpg,
myblob/myblob_close.m,
myblob/myblob_command.m,
myblob/myblob_demo.m,
myblob/myblob_from_db.m,
myblob/myblob_open.m,
myblob/myblob_to_db.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
23 Jun 2006 Michael Ewens

Works well, even if you don't need blob capability.

20 Sep 2006 none none

nice, just what I was looking for.

08 May 2008 Brian McFee

Beware, this only seems to work on windows.

06 Oct 2008 Lucy Matlab

using Matlab 2008a and MySql 5.0 for Win32:

??? Invoke Error, Dispatch Exception:
Source: Microsoft OLE DB Provider for ODBC Drivers
Description: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Error in ==> myblob_open at 40
ado_connection.Open;

Error in ==> myblob_demo at 26
connection = myblob_open (user, password, server, database);

25 Oct 2008 Joerg Buchholz

@Lucy: Matlab 2008b seems to work with the MySQL ODBC 3.51 Driver and the MySQL ODBC 5.1 Driver. If you want to use the MySQL ODBC 5.1 Driver you have to change line 22 in myblob_open.m from
    'driver=MySQL ODBC 3.51 Driver; ' ...
to
    'driver=MySQL ODBC 5.1 Driver; ' ...

03 Nov 2009 Mike Koelemay

Additionally, to allow this to work from 64-bit Matlab, install the 64-bit version of MSDASQL via a Microsoft hot fix (link below) and add "provider=MSDASQL" to the connection string

Source:
http://forums.mysql.com/read.php?37,280613,281101#msg-281101

Hot fix:
http://www.microsoft.com/downloads/details.aspx?FamilyID=000364db-5e8b-44a8-b9be-ca44d18b059b&displaylang=en

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data import Joerg Buchholz 22 Oct 2008 08:11:39
data export Joerg Buchholz 22 Oct 2008 08:11:39
myblob Joerg Buchholz 25 Oct 2008 12:15:09
mysql Joerg Buchholz 25 Oct 2008 12:15:19
blob Joerg Buchholz 25 Oct 2008 12:15:23
database Joerg Buchholz 25 Oct 2008 12:15:30
ado Joerg Buchholz 25 Oct 2008 12:15:37
sql Joerg Buchholz 25 Oct 2008 12:15:43
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com