- Have you added the driver to your path? You need a statement like javaaddpath('/path_to_directory/postgresql-8.3-604.jdbc3.jar')
- Is your database source name really called "database"?
MATLAB to postgreSQL
조회 수: 12 (최근 30일)
이전 댓글 표시
I try to connect matlab and postgresql,
conn = database('database', 'postgres', '12345', 'org.postgresql.Driver', 'jdbc:postgresql://localhost:5432/');
but
Error using database>errorhandling (line
209)
[Microsoft][ODBC Driver Manager] Data
source name not found and no default driver
specified Please verify that login
information and database url are valid.
Error in database (line 184)
errorhandling(connection.Message);
Error in convertDBtoMat (line 26)
conn = database('database', 'postgres', '12345');
What i need to do
thank you
댓글 수: 0
답변 (1개)
the cyclist
2012년 1월 10일
Two thoughts:
댓글 수: 3
the cyclist
2012년 1월 10일
Hm. I don't think I have any other specific hypotheses of what it could be. Some general things you could try, though:
Use the debugger to halt the execution inside database.m, stepping through to see where exactly the database object "connection" might seem to be going wrong. It will make a call to the java method "makeDatabaseConnection" (probably on line 130), so that's a good place to check if things are in order.
Are you able to connect to the database from your machine using another program? For example, can you use the same setup to access your database using pgAdmin?
You might want to contact Mathworks support. Database Toolbox questions often don't get a lot of traffic here, so I suspect there are not a lot of people knowledgeable about it.
참고 항목
카테고리
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!