Results 1 to 4 of 4

Thread: QODBC on Wine LINUX not connect

  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QODBC on Wine LINUX not connect

    I have build moore as 10 application on window and all running on Wine LINUX http://www.winehq.com/ on installer and so... whitout crasch or soo..

    Now i try to convert access db on a console apps and cant not connect Why?

    http://www.dependencywalker.com/ depend.exe not find moore dll wo i can insert...

    Qt Code:
    1. /* convert stupid access to sqlite3 */
    2. void RegDB::SetDbFile( const QString dbfile )
    3. {
    4. #if defined Q_WS_MAC
    5. std::cout << "### Error MAC not having QODBC Microsoft Access Driver. Use WINE or similar." << std::endl;
    6. return;
    7. #endif
    8. #if defined Q_WS_X11
    9. std::cout << "### Error Linux not having QODBC Microsoft Access Driver. Use WINE or similar." << std::endl;
    10. return;
    11. #endif
    12. #if defined Q_WS_WIN
    13. std::cout << "### Wait... Load QODBC Microsoft Access." << std::endl;
    14. #endif
    15.  
    16. QStringList drivers = QSqlDatabase::drivers();
    17. if (!drivers.contains("QODBC")) {
    18. std::cout << "### Load QODBC Microsoft Access Driver Fail!." << std::endl;
    19. return;
    20. }
    21.  
    22. const QString command = QString("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=%1").arg(dbfile);
    23. QFileInfo fi(dbfile);
    24. FileName = fi.fileName();
    25. newsqlite3DB = QString("%1.sqlite3").arg(fi.baseName()); /* temp database sqlite3 binary */
    26. newsqlite3_DUMPDB = QString("%1.sql").arg(fi.baseName()); /* dump file sql text to gz */
    27. db0 = QSqlDatabase::addDatabase("QODBC");
    28. db0.setDatabaseName(command);
    29.  
    30.  
    31. if (db0.open()) {
    32. std::cout << "### Microsoft Access Driver =" << db0.open() << std::endl;
    33. } else {
    34. std::cout << "Error file Microsoft Access Driver DBAccessOpen=" << db0.open() << std::endl;
    35. return;
    36. }
    37. std::cout << "### Wait.. Convert Microsoft Access to SQLITE3...." << std::endl;
    38. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QODBC on Wine LINUX not connect

    If you have the time, maybe you can try Process Explorer from http://www.microsoft.com/technet/sys...sExplorer.mspx

    It also lists program dependencies dynamically, but this one is known to really work. Probably you will have to run your program in debug( step by step) and look in PE to see what it loads/unloads.

    Regards

  3. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QODBC on Wine LINUX not connect

    Quote Originally Posted by marcel View Post
    If you have the time, maybe you can try Process Explorer from http://www.microsoft.com/technet/sys...sExplorer.mspx

    It also lists program dependencies dynamically, but this one is known to really work. Probably you will have to run your program in debug( step by step) and look in PE to see what it loads/unloads.

    Regards
    I try to compile static ( i have two qt4 version dir D:qt && d:qts and qts ist static) but no way this odbc access is a hard nut or Microsoft have bad access db!


    the console app on wine:
    Qt Code:
    1. $ wine aconvert.exe -mdb lastreg.mdb
    2. ### Wait... Load QODBC Microsoft Access.
    3. QODBCDriver::open: Unable to allocate environment Error:
    4. QODBCDriver::open: Unable to allocate environment Error:
    5. Error file Microsoft Access Driver DBAccessOpen=0
    To copy to clipboard, switch view to plain text mode 

    Other graphical odbc run

    wine odbc_wizard.exe

    && display odbc driver + mysql + sqlite


    The binary console app is inside
    http://ppk.ciz.ch/qt_c++/odbc/odbc_w...aller2.2.6.exe


    I suppose only graphical qt apps can run on linux wine....

    i try now the other ProcessExplorer on win to see if other dll is load....

  4. #4
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QODBC on Wine LINUX not connect

    the are no way to run QODBC on linux wine exe.. or a apps to grab microsoft access && convert to sqlite.. (on linux or wine) and -static only sqlite can build... & run.

    the is a Black Day wo Microsoft as Born Access DB format...

    Only http://sourceforge.net/projects/mdbtools/ can read this black file on linux! and return a
    CSV like text format...

    but if you put to mdbtools a new access from 2003 nothing convert...

    Only window os can convert Microsofti access db file!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.