Access a database on 64bit Matlab
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!