我在带有Image DataType的SqlServer表中存储了一张图片 现在我想要从表中检索图像但是图像Dosenot Retrive和Show! 这是我的.h代码:
QPixmap originalPixmap;
QPixmap outPixmap;
QByteArray inByteArraye;
QByteArray outByteArray;
和Cpp文件代码:
readSkeletonPicQry.exec("SELECT SskeletonPic FROM Patient_File WHERE SmeliCode='"+seMcode+"'");
readSkeletonPicQry.next();
outByteArray = readSkeletonPicQry.value(0).toByteArray();
outPixmap = QPixmap();
outPixmap.loadFromData(outByteArray);
scene->addPixmap(outPixmap);
ui->graphicsView_2->setScene(scene);
qDebug() << readSkeletonPicQry.exec();
qDebug() << "outByteArray :" << outByteArray.size();
在调试部分:
QODBCResult::exec: Unable to execute statement: "[Microsoft][ODBC Driver Manager] Function sequence error"false
outByteArray : 8
我的inByteArray在19000尺寸的商店模式下! 但是在8岁时检索! 怎么了? 非常感谢