Access a database on 64bit Matlab

1 visualización (últimos 30 días)
Beat
Beat el 14 de En. de 2014
Editada: Beat el 14 de En. de 2014
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.

Respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by