Home > m > gui > ltpdaRepoGUI > callbacks > getFields.m

getFields

PURPOSE ^

get the selected table

SYNOPSIS ^

function fields = getFields(conn)

DESCRIPTION ^

 get the selected table

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fields = getFields(conn)
0002 
0003 
0004 % get the selected table
0005 tblSel = findobj('Tag', 'tableSelect');
0006 tbls   = get(tblSel, 'String');
0007 tbl    = tbls{get(tblSel, 'Value')};
0008 
0009 if ~isempty(conn)
0010   % get the databases
0011   q = sprintf('describe %s', tbl);
0012   curs = exec(conn, q);
0013   curs = fetch(curs);
0014 
0015   fields = curs.Data(:,1);
0016   close(curs);
0017 else
0018   fields = {'-'};
0019 end
0020

Generated on Thu 01-Nov-2007 09:42:34 by m2html © 2003