Hi everyone, i programing license plate recognition programs, and appeared problem. So after few examples i figure out my code.
function pushbutton1_Callback(hObject, eventdata, handles)conn = database('baze', 'root', 'root', 'Vendor', 'MYSQL', 'Server', 'localhost', 'PortNumber', 3306);setdbprefs('datareturnformat','structure');a = get(handles.edit8,'String');if iscell(a) && numel(a) == 1 a = a{1};endif ~ischar(a) || isempty(a); error('A valid string must be supplied!');endsqlquery = ['select vardas, pavarde, laipsnis, pareigos, telefonas, marke, numeris, tarnyba from info '... 'where numeris = ' '''' a ''''];curs = exec(conn, sqlquery);curs = fetch(curs);curs.dataclose(curs)close(conn)
All this i got in Matlab command window, but if i have gui aplication and i want retrive value in gui wich have edit text box. Example: after i input car plate number – got 'vardas' in edit1 and 'pavarde' in edit2. Thanks in advance for the answers.
Best Answer