Error using database.j​dbc.connec​tion/selec​t (line 74) Invalid connection.

2 ビュー (過去 30 日間)
Oleh Chaharyn
Oleh Chaharyn 2019 年 5 月 2 日
回答済み: Bob Hickish 2020 年 5 月 18 日
I can't connect to database using jdbc driver:
Error using database.jdbc.connection/select (line 74)
Invalid connection.
I tried to reinstall driver, updated javaclasspath but it doesn't work.
Is there any solution?

回答 (1 件)

Bob Hickish
Bob Hickish 2020 年 5 月 18 日
I'm not sure if we had the same issue, but I managed to resolve mine by using these three functions in this order:
opts = configureJDBCDataSource('Vendor','PostgreSQL')
opts = setConnectionOptions(opts,"DataSourceName","PostgreSQL",..)
conn = database(databasename,username,password,driver,url)
I then checked I was connected to the database with: isopen(conn)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by