Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-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
Joined
Oct 27, 2005
Messages
4
Location
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:odbc: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.

Part and Inventory Search

Sponsor

Back
Top