Home > m > gui > ltpdaRepoGUI > callbacks > getTables.m

getTables

PURPOSE ^

Get a list of database tables

SYNOPSIS ^

function tables = getTables(conn)

DESCRIPTION ^

 Get a list of database tables
 
 M Hewitson
 
 $Id: getTables.m,v 1.2 2008/01/22 20:45:22 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function tables = getTables(conn)
0002 
0003 % Get a list of database tables
0004 %
0005 % M Hewitson
0006 %
0007 % $Id: getTables.m,v 1.2 2008/01/22 20:45:22 hewitson Exp $
0008 %
0009 
0010 
0011 mainfig = findobj('Tag', 'LTPDARepomainfig');
0012 
0013 % Get conn
0014 conn = getappdata(mainfig, 'connection');
0015 
0016 if ~isempty(conn)
0017   % get the databases
0018   q = 'show tables';
0019   curs = exec(conn, q);
0020   curs = fetch(curs);
0021 
0022   tables = curs.Data;
0023   close(curs);
0024 else
0025   tables = {'-'};
0026 end
0027

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003