[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi/kexidb/drivers/mySQL
From:       Sharan Rao <sharanrao () gmail ! com>
Date:       2007-12-10 21:00:00
Message-ID: 1197320400.150337.26576.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 747026 by sharan:

Reuse existing function



 M  +2 -17     mysqlconnection.cpp  


--- trunk/koffice/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp #747025:747026
@@ -179,23 +179,8 @@
 
 bool MySqlConnection::drv_getTablesList( QStringList &list )
 {
-	KexiDB::Cursor *cursor;
-	m_sql = "show tables";
-	if (!(cursor = executeQuery( m_sql ))) {
-		KexiDBDbg << "Connection::drv_getTablesList(): !executeQuery()" << endl;
-		return false;
-	}
-	list.clear();
-	cursor->moveFirst();
-	while (!cursor->eof() && !cursor->error()) {
-		list += cursor->value(0).toString();
-		cursor->moveNext();
-	}
-	if (cursor->error()) {
-		deleteCursor(cursor);
-		return false;
-	}
-	return deleteCursor(cursor);
+        list.clear();
+	return queryStringList( "show tables", list );
 }
 
 PreparedStatement::Ptr MySqlConnection::prepareStatement(PreparedStatement::StatementType type, 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic