How to pass database name to datainsert in case of using ODBC?
Show older comments
I had memory problems when using JDBC so now I want to use ODBC but I don't know where to pass the database name. I'm getting this error [MySQL][ODBC 5.3(w) Driver][mysqld-5.5.5-10.1.21-MariaDB]No database selected
The connection is successful though username=''; pwd=''; conn = database('MySQL_ODBC',username,pwd); >> conn.ping
ans =
DatabaseProductName: 'MySQL'
DatabaseProductVersion: '5.5.5-10.1.21-MariaDB'
JDBCDriverName: 'JDBC-ODBC Bridge (myodbc5w.dll)'
JDBCDriverVersion: '2.0001 (05.03.0009)'
MaxDatabaseConnections: 0
CurrentUserName: '?'
DatabaseURL: 'jdbc:odbc:MySQL_ODBC'
AutoCommitTransactions: 'True'
conn
conn =
database with properties:
Instance: 'MySQL_ODBC'
UserName: ''
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 sun.jdbc.odbc.JdbcOdbcConnection]
TimeOut: 0
AutoCommit: 'on'
Type: 'Database Object'
Accepted Answer
More Answers (0)
Categories
Find more on Export Data Programmatically in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!