function dbimportdemo()
%DBIMPORTDEMO Imports data into Matlab from a database.

%   Version 1.0  21-Oct-1997
%   Author(s): E.F. McGoldrick, 12/5/1997
%   Copyright (c) 1984-2000 The MathWorks, Inc.

% $Revision: 1.6 $   $Date: 2000/01/20 14:07:31 $

% Set maximum time allowed for establishing a connection.

timeoutA=logintimeout(5)

% Connect to a database.

connA=database('SampleDB','','')

% Check the database status.

ping(connA)

% Open cursor and execute SQL statement.

cursorA=exec(connA,'select country from customers');

% Fetch the first 10 rows of data.

cursorA=fetch(cursorA,10)

% Display the data.

AA=cursorA.Data

% Close the cursor and the connection.

close(cursorA)
close(connA)
