Mercurial > hg > ltpda
diff m-toolbox/classes/tests/database/@ltpda_tsdata_table/getTableEntry.m @ 25:79dc7091dbbc database-connection-manager
Update tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line diff
--- a/m-toolbox/classes/tests/database/@ltpda_tsdata_table/getTableEntry.m Mon Dec 05 16:20:06 2011 +0100 +++ b/m-toolbox/classes/tests/database/@ltpda_tsdata_table/getTableEntry.m Mon Dec 05 16:20:06 2011 +0100 @@ -18,8 +18,8 @@ assert(numel(dataID)==1, sprintf('Found more than one data ID for the given object ID %d', objID)); % Create query to get the field 'xunits' from the 'cdata' table - query = sprintf('SELECT %s FROM %s WHERE %s.id=%d', tableField, dbTable, dbTable, dataID{1}); - val = executeQuery(utp, query); + query = sprintf('SELECT %s FROM %s WHERE %s.id = ?', tableField, dbTable, dbTable); + val = utils.mysql.execute(utp.conn, query, dataID{1}); catch Me rethrow(Me); end @@ -29,7 +29,5 @@ else throw(MException('ltpda_cdata_table:getTableEntry', 'Unknown database layout.')); end - - utp.conn.setLocked(false); - utp.conn.closeConnection(); + end