- 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
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
the cyclist
el 10 de En. de 2012
Two thoughts:
3 comentarios
the cyclist
el 10 de En. de 2012
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.
Ver también
Categorías
Más información sobre Database Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!