samedi 9 mai 2015

Exception during connecting to postgresql database using wt c++ library?

I`m trying to connect to postgresql database which name is "galaxydatabase" and I encountered an unhandled exception. Source code:

#include <Wt/Dbo/Dbo>
#include <Wt/Dbo/backend/Postgres>

namespace dbo = Wt::Dbo;

void run()
{
    dbo::backend::Postgres po;
    po.connect("galaxydatabase");
    // or
    //dbo::backend::Postgres po("galaxydatabase"); // the same exception???
}

int main(int argc, char **argv)
{
    run();
}

Password to the database is "dbpass". I don`t know where put this password in the code?

Aucun commentaire:

Enregistrer un commentaire