Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MATLAB-SQL-JDBC

Status
Not open for further replies.

ak501

Computer
Oct 27, 2005
4
0
0
DE
Hello All,

I was able to connect to SQL from MATLAB using JDBC connection as follows

java.lang.Class.forName('sun.jdbc.odbc.JdbcOdbcDriver');
url = 'jdbc:eek:dbc:mydb';
url = java.lang.String(url);
con = java.sql.DriverManager.getConnection(url,'guest','guest');
statement=con.createStatement();
qr='SELECT * FROM var';
rs=statement.executeQuery(qr);
i=1;
while(rs.next())
result_set.getString(i)
i=i+1;
end



Now, I just want to connect directly to MySQL database without using a ODBC connection.
for example
java.lang.Class.forName('sun.jdbc.mysql);
.
.
.
.
.
Does anyone know how to do it?

Thank you
matlabeer
 
Status
Not open for further replies.
Back
Top