Code covered by the BSD License  

Highlights from
adodb_tools

5.0

5.0 | 3 ratings Rate this file 28 Downloads (last 30 days) File Size: 160.14 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

The author wishes to acknowledge the following in the creation of this submission:
database connection mfiles, Myblob, ADO OLE Database Connection

MATLAB release MATLAB 7.10 (2010a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
02 Feb 2011 Tony  
02 Feb 2011 Tony

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

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?

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);

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.

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

11 Apr 2012 Dennis  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
ado Jaroslaw Tuszynski 06 Dec 2010 08:22:52
blob Jaroslaw Tuszynski 06 Dec 2010 08:22:52
data export Jaroslaw Tuszynski 06 Dec 2010 08:22:52
data import Jaroslaw Tuszynski 06 Dec 2010 08:22:52
database Jaroslaw Tuszynski 06 Dec 2010 08:22:52
myblob2 Jaroslaw Tuszynski 06 Dec 2010 08:22:52
query Jaroslaw Tuszynski 06 Dec 2010 08:22:53
sql Jaroslaw Tuszynski 06 Dec 2010 08:22:53
adodb Jaroslaw Tuszynski 06 Dec 2010 08:22:53
access Jaroslaw Tuszynski 06 Dec 2010 08:22:53
oracle Jaroslaw Tuszynski 06 Dec 2010 08:22:53
mysql Jaroslaw Tuszynski 06 Dec 2010 08:22:53
access Fernando 09 Jun 2011 23:36:06

Contact us at files@mathworks.com