Access a database on 64bit Matlab
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Database Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!