New Qt Sql Driver



  • Hello!

    I have just started to build a new qt sql driver for CUBRID rdbms (http://www.cubrid.org/). I'd like to invite everyone interested on contributing to this kind of project. The driver is named QCubrid and it's already available at gitorious (http://gitorious.org/qcubrid).

    Regards,
    Antonio Marcio A. Menezes.



  • Hello Antonio,

    I'm very pleased you've created a post here. You know what?

    The developers at "DBM":http://sourceforge.net/projects/dbm-project/ (Database Deployment Manager) and "RoboJournal":http://sourceforge.net/projects/robojournal/ also depend on Qt SQL driver in their application. They've just joined our CUBRID Affiliate program, just like you did, and have requested the Qt driver for CUBRID. I will be more than happy to introduce you to them to collaboratively improve the Qt driver for CUBRID.

    What do you think about this?



  • Hello, Esen Sagynov.

    Very good news! I'm glad to know those developers. Collaboration is what we need to improve the driver!

    Regards,
    Antonio.



  • Hi,

    I try to use this driver, but every time I use it it tells me:

    "QCUBRID: DBMS error during connection" and error number is "-1"

    Here is the code:

    QSqlDatabase cubridDb = QSqlDatabase::addDatabase("QCUBRID");
    cubridDb.setHostName("");
    cubridDb.setUserName("admin");
    cubridDb.setPassword("<pass>");
    cubridDb.setPort(8001);

    did I miss something? (cubridmanager can connect to the same instance ... )

    Regards,
    f.

    EDIT Nevermind, the issue is that the value 30000 is hard coded in the driver (open) but my cubrid runs on a different port.



  • Hi fritzone,

    Your code is missing the database name. You need to tell the driver which database you would like to connect to. In other words, connection is made per database, not per server.

    I'm not familiar with Qt SQL interface, but from the above code, I can guess you need to call cubridDb.setDatabaseName(). According to http://harmattan-dev.nokia.com/docs/library/html/qt4/qsqldatabase.html, this API seems to be correct.

    Please try and let us know the results.



  • By the way, I've just noticed that you're using port 8001 (CUBRID Manager Server port). You shouldn't use it as it's for CUBRID Manager in order to connect to CUBRID Manager Server for administrative actions.

    Client applications, including CUBRID Query Browser, should connect to a CUBRID Broker port (defaults to 33000 or 30000).

    If the QtCubrid driver has a hardcoded port, it needs to be fixed to allow any user specified port.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.