Nicholas Nicholas - 1 month ago 13
SQL Question

How do I access Microsoft SQL Server from Matlab using ODBC?

I built a data source from Microsoft SQL Server in ODBC and attempted to connect to the data source using Database Explorer in Matlab, however, I got the error "[Microsoft][ODBC Driver Manager] Invalid string or buffer length". Can anyone help?

enter image description here

Answer

I found a link to this error on the MathWorks site.

http://www.mathworks.com/matlabcentral/answers/93553-why-do-i-get-the-error-invalid-string-or-buffer-length-when-using-an-odbc-driver-with-the-database

If you receive this message you may be using the wrong driver. For nearly all databases, you must use JDBC drivers with 64-bit machines.

This information can be found in the documentation:

http://www.mathworks.com/help/releases/R2011b/toolbox/database/ug/bq89k8o-1.html#bq89k8p-5

Comments