????????????mysql?????????????????????£?
????Step 1:??mysql-connector-java-5.1.7-bin.jar?????????......MATLABR2009ajavajar oolbox
????Step 2:??......MATLABR2009a oolboxlocal???£????classpath.txt??????????????????????mysql??jdbc???????
????$matlabroot/java/jar/toolbox/mysql-connector-java-5.1.7-bin.jar
????Step 3:???′?MATLAB????
???????????????????????????matlab????mysql?????????
????conn=database('databasename'??'username'??'password'??'driver'??'databaseurl')
???????????????????????
???????????£?
????*databasename: ?????????.
????*driver: JDBC driver.
????*username and password: ???????????.
????*databaseurl: ??????jdbc:subprotocol:subname. subprotocol????????????
????subname??????//hostname:port/databasename.
???????matlab?????????????????????????????????????
Instance: 'SampleDB'
UserName: ''
Driver: []
URL: []
Constructor: [1x1com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 sun.jdbc.odbc.JdbcOdbcConnection]
TimeOut: 0
AutoCommit: 'off'
Type: 'Database Object'
????????mysql????????£?
????conn = database('tissueppi'??'root'??'root'??'com.mysql.jdbc.Driver'??'jdbc:mysql://localhost:3306/tissueppi');
??????????????????exec???????sql???
????exec???????sql???????????????
?????????£?
????curs =exec(conn??'sqlquery')
???????磺curs = exec(conn?? 'select * fromcustomers')
?????????????????????????????cursor??????????curs?У??ù???????
????cursor.fetch?????????