• 5599阅读
  • 3回复

连接access数据库,却找不到驱动 [复制链接]

上一主题 下一主题
离线samp
 
只看楼主 正序阅读 楼主  发表于: 2007-11-29
— 本帖被 XChinux 执行加亮操作(2007-12-07) —
int main( int argc, char *argv[] )
{
    QApplication app( argc, argv );

    QSqlDatabase db = QSqlDatabase::addDatabase( "QODBC");
    db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=E:\testdb\aa.mdb");
    if ( db.open() )
    {
        printf("open");
                }
    else printf("error");
    return 0;
}

运行显示 
QSqlDatabase:QODBC driver not loaded
QSqlDatabase:availble drivers : QSQLITE

请问这是怎么回事?  谢谢!!
离线samp
只看该作者 3楼 发表于: 2007-12-12
问题已解决,因为QODBC没有编译 ,谢谢大家
离线zncggaofei
只看该作者 2楼 发表于: 2007-11-29
QSqlDatabase:availble drivers : QSQLITE

表示你只能用 SQLite数据库
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
离线zncggaofei
只看该作者 1楼 发表于: 2007-11-29
是你的QT版本没有驱动,需要编译QODBC的驱动
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
快速回复
限100 字节
 
上一个 下一个