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 Center および File ExchangeDatabase Toolbox についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by