Error using database toolbox - Can't even connect to "dbtoolboxdemo" database

조회 수: 5 (최근 30일)
Sara
Sara 2014년 1월 9일
편집: John Kelly 2015년 2월 27일
Hi Everyone,
I just installed the Database toolbox and am having a lot of trouble even establishing a connection to the dbtoolboxdemo database. I use the command:
conn = database.ODBCConnection('dbtoolboxdemo','admin','admin')
and I get this error message:
Undefined variable "com" or class
"com.mathworks.toolbox.database.databaseConnect".
Error in ==> database.database at 85 conn=com.mathworks.toolbox.database.databaseConnect(instance,UserName,Password);
Perhaps I am missing some necessary drivers? Thank you very much for your help!!

답변 (2개)

Tushar Sinha
Tushar Sinha 2014년 6월 19일
편집: John Kelly 2015년 2월 27일
You need to setup the dbtoolboxdemo database before establishing a connection. Refer to the link given below for instructions on how to setup the database

Kiran Math
Kiran Math 2014년 8월 19일
Sara : Could you eventually able to connect to Sql Server from Matlab.
For me when I use the native ODBC connection .. I get the following error conn = database.ODBCConnection('dbtoolboxdemo','admin','admin');
Undefined variable "database" or class "database.ODBCConnection"

카테고리

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