Access a database on 64bit Matlab

1 次查看(过去 30 天)
Beat
Beat 2014-1-14
编辑: Beat 2014-1-14
This post is a solution I found myself. No reply needed.
Migrating from 32bit to 64bit matlab requires changing from ODBC to JDBC. For this purpose, you have to change the connection sequence from
conn=database(' ODBC connection name set in control panel ',' UserName ',' PassWord ')
to
conn=database(' database_name ',' UserName ',' PassWord ','com.microsoft.sqlserver.jdbc.SQLServerDriver','jdbc:sqlserver://*servername*:1433;database= database_name ')
Mind to replace the parameters typeset in bold and omit the spaces. The example is given for an MS SQL server connection. Other database server products have different driver names and ports (i.e. you also have to change 1433 if you use another database server product).
Otherwise, you get errors like
[Microsoft][ODBC Driver Manager] Invalid string or buffer length
while creating the connection.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by