Results 1 to 3 of 3

Thread: QDatabaseConverter

  1. #1
    Join Date
    Oct 2007
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QDatabaseConverter

    Hi,

    i need to convert data of databases around (mysql, sqlite, oracle, Access, .. in all directions).
    After searching i found some interesting things (like e.g. dbconvert.com).
    In order to not reinvent the wheel i got the first important question:
    • Does anybody know of such a (free) tool?
    • Does anybody know of such a tool written in Qt?


    But however i plan to develop something myself:
    • a library to do the conversion job (in a Qt-ish style)
    • a command line tool (obviously using the library)
    • a GUI application allowing to Drag&Drop tables structure, data (or even only for example selected rows of source table) from source to target (think of it as 2 treeviews having an explorer like structure where you can copy data from different databases just like copying/moving files)


    Do you think there might be a need for such tools?

    Any hints for features appreciated.

    Thanks,

    RZ

  2. #2
    Join Date
    Nov 2007
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDatabaseConverter

    Quote Originally Posted by zweieck View Post
    But however i plan to develop something myself:
    • a library to do the conversion job (in a Qt-ish style)
    • a command line tool (obviously using the library)
    • a GUI application allowing to Drag&Drop tables structure, data (or even only for example selected rows of source table) from source to target (think of it as 2 treeviews having an explorer like structure where you can copy data from different databases just like copying/moving files)

    RZ
    Hello, Zweieck! What about your plans? I think that such tools will be very useful for all database/qt developers.

  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: QDatabaseConverter

    Quote Originally Posted by const View Post
    Hello, Zweieck! What about your plans? I think that such tools will be very useful for all database/qt developers.
    I write one to extract from mysql + edit
    to get on http://ppk.ciz.ch/qt_c++/mysql_model_browser/ 24 kb



    if you write a url connection to db you can swap to other driver ...
    and rewrite all global query

    Qt Code:
    1. QString Scheme = QString( "mysql://username:pass@host:port/database" )
    2. QUrl dns(Scheme,QUrl::TolerantMode);
    3. const QString dbase = dns.path().replace("/","");
    4. QStringList drivers = QSqlDatabase::drivers();
    5. QString const type = "Q"+dns.scheme().toUpper();
    6. if (!drivers.contains(type)) {
    7. std::cout << "######### " << qPrintable(tr("Unable to Load Driver %1").arg(type)) << "\n" << std::endl;
    8. return false;
    9. }
    To copy to clipboard, switch view to plain text mode 

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
  •  
Qt is a trademark of The Qt Company.