Why don't you build a list of the ids you want to retrieve. (I assume, that its not just all or some simple subset...)
for (int i=0;i < list.length();++i)
{
idset
+= QString::number(list.
at(i
));
if (i < list.length()-1)
idset += ",";
}
idset += ")";
q.exec("SELECT my_blob_column FROM my_table WHERE id in "+idset+";");
while (q.next())
{
}
..
QString idset = "(";
for (int i=0;i < list.length();++i)
{
idset += QString::number(list.at(i));
if (i < list.length()-1)
idset += ",";
}
idset += ")";
QSqlQuery q;
q.exec("SELECT my_blob_column FROM my_table WHERE id in "+idset+";");
while (q.next())
{
}
..
To copy to clipboard, switch view to plain text mode
HIH
Johannes
Bookmarks