how to retrieve data(select statement) from mysql using matlab GUI

hello..i'm still new in using this software..i want to ask.
this is my coding..i get from querybuilder after generate m.file. before this i try another trying..but fail..based on this, all data from my table, i get. but here my problem is how to retrieve data(select statement) from mysql using matlab GUI?another key is i want generate search button.
% Set preferences with setdbprefs.
s.DataReturnFormat = 'cellarray';
s.ErrorHandling = 'store';
s.NullNumberRead = 'NaN';
s.NullNumberWrite = 'NaN';
s.NullStringRead = 'null';
s.NullStringWrite = 'null';
s.JDBCDataSourceFile = 'C:\Users\farhana\Documents\MATLAB\farhana.mat';
s.UseRegistryForSources = 'yes';
s.TempDirForRegistryOutput = 'C:\Users\farhana\AppData\Local\Temp';
setdbprefs(s)
% Make connection to database. Note that the password has been omitted.
% Using JDBC driver.
conn = database('farhana','root','1234','com.mysql.jdbc.Driver','jdbc:mysql://localhost/farhana');
% Read data from database.
e = exec(conn,'SELECT ALL aa,bb FROM test');
e = fetch(e);
close(e)
% Close database connection.
close(conn)
hope anybody can help me..;) tq..

标签

提问:

2011-4-16

Community Treasure Hunt

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

Start Hunting!

Translated by