Code covered by the BSD License  

Highlights from
adodb_tools

5.0

5.0 | 4 ratings Rate this file 49 Downloads (last 30 days) File Size: 160 KB File ID: #29615

adodb_tools

by Jaroslaw Tuszynski

 

03 Dec 2010

Adodb_tools allow communication with different types of databases through ADO OLEDB component.

| Watch this File

File Information
Description

Package adodb_toolbox allows communication with different types of databases through Microsoft's ADO (ActiveX Data Objects) OLEDB component. The package was designed to work on Microsoft SQL Server, Oracle, Microsoft Access, MySQL and other databases.

This package can connect to dozen different database types, perform wide range of different query types and convert results to MATLAB Struct data structures as well as regular cell tables. Matlab struct output uses similar format as used by xml_io_tools and csv2struct libraries. Reading and writing BLOB objects is supported.

This package can be studied, modified, customized, rewritten and used in other packages without any limitations. All code is included and documented. Software is distributed under BSD Licence (included).

Acknowledgements

Database Connection Mfiles, Myblob, and Ado Ole Database Connection inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File  
Everyone's Tags
access(2), ado, adodb, blob, data export, data import, database, myblob2(2), mysql, oracle, query(2), sql
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
17 Jul 2012 Dan Golding

Fantastic tool, simple and fast!

11 Apr 2012 Dennis  
01 Mar 2012 Dana

I have been using these tools for a while now and they have been working great. Unfortunately, they just gave me a new computer and now adodb_connect gives me an error. It was working fine on a 32bit Windows XP computer with MATLAB2010a. Now on a 64bit Windows 7 machine with MATLAB2010b I get the error:
??? 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

My connection string DOES specify the correct data source and the driver (which IS installed on the new machine).

Any suggestions?

Thanks

03 Feb 2012 Jaroslaw Tuszynski

Reply to Pete:
I was using this script to add a lot (~60k) of records to access DB, and use access as temporary memory storage to get some MATLAB codes to run on machined with 2GB or RAM. I did not notice any "extreme" slowness, but that might be relative.

The error you see might be due to MS access not supporting multiple queries.

29 Jan 2012 Pete sherer

This is a great script. However it is extremely slow when trying to multiple records to the accessDB. Is there a way to do insert into for multiple records?
Pref.MultipleQuery = true; is not working!
sql = 'INSERT INTO xport (ACCNT,Name) VALUES ("Pers","02")
INSERT INTO xport (ACCNT,Name) VALUES ("Cars","1008") ';
Got error:
??? Invoke Error, Dispatch Exception:
Source: Microsoft JET Database Engine
Description: Missing semicolon (;) at end of SQL statement.

Error in ==> adodb_query at 54
ado_recordset = ado_connection.Execute(sql);

19 Aug 2011 Julian

Thanks for this useful contribution -- I have been using ADO similarly for quite a while now. But I have found it broke in MATLAB R2010b onwards.
Have you tried your toolbox in a later version of MATLAB than R2010a?

02 Feb 2011 Tony

Great little script, much faster than the database toolbox supplied by matlab. Better documentation would be nice though.

02 Feb 2011 Tony  

Contact us