comparison m-toolbox/classes/tests/database/@ltpda_database/executeQuery.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children 79dc7091dbbc
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 %
2 % DESCRIPTION: Returns the result for a given query.
3 %
4 % VERSION: $Id: executeQuery.m,v 1.1 2011/05/25 16:20:25 ingo Exp $
5 %
6 function val = executeQuery(utp, query)
7
8 utp.conn.setLocked(true);
9 utp.conn.openConnection();
10 c = utp.conn.getConn();
11
12 try
13 val = utils.jmysql.execute(c, query);
14 catch Me
15 utp.conn.setLocked(false);
16 utp.conn.closeConnection();
17 rethrow(Me);
18 end
19
20 utp.conn.setLocked(false);
21 utp.conn.closeConnection();
22 end