• 请不要在回答技术问题时复制粘贴 AI 生成的内容
smallghost
V2EX  ›  程序员

QT 中为什么读取 sqlite 的 blob 字段内容和实际数据库中得内容不一样

  •  
  •   smallghost · Jun 5, 2014 · 4309 views
    This topic created in 4408 days ago, the information mentioned may be changed or developed.
    代码其实很简单:
    QSqlQuery query(db);
    query.exec("select blobfield from img");
    query.first();
    QByteArray bytes = query.record().value(0).toByteArray();
    这里得到的bytes数据 和 用数据库工具中看到的内容不一样。我用delphi把数据导出来看和数据库工具看得一模一样的,是不是还有什么选项需要设置呀?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4302 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 01:00 · PVG 09:00 · LAX 18:00 · JFK 21:00
    ♥ Do have faith in what you're doing.