Code covered by the BSD License  

Highlights from
adodb_tools

5.0

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

adodb_tools

by

 

03 Dec 2010 (Updated )

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   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
15 Jan 2014 Jaroslaw Tuszynski

Reply to Bruce:
I had the same problem lately after upgrading to 64-bit computer and installing 64-bit MATLAB. Apparently my MS Office was 32-bit and neither this toolbox nor MATLAB Database Toolbox was able to work with it. I solved the problem by uninstalling 32-bit office and reinstalling 64-bit version.

21 Nov 2013 Bruce

Has anyone got this to work with an access2010 on a 64 bit system? Recently upgraded from 32 to 64 and can no longer connect to my access DBs.

15 Oct 2013 Bruce

Problem solved... Keywords are a pain :-)

14 Oct 2013 Bruce

Mostly great. But just tried a query that works in access itself, but fails with "Error using COM.ADODB_Connection/Execute
Invoke Error, Dispatch Exception: Unspecified error" when executed with adodb_query(sql)

Any thoughts on how to figure out what went wrong?

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  
Updates
15 Jan 2014

update MS Access connection strings and file formats to the ones used in Office 2010

Contact us