Illegal pointer TSQLServer

ROOT Version: 5.34/36
Platform: Red Hat
Compiler: GNU C/C++ CINT

Hi Everyone! I’m tryin’ to run a macro to connect to a DB, but I keep gettin’ the same error all the time, for reasons that are unknown to me. I would appreciate if someone of u could help me out.
Here is the part of the code I’m gettin’ my error at:

TSQLServer *db;
  db = TSQLServer::Connect("pgsql://mydatabase", "uid", "upw");
  if (db->GetErrorCode()!=0){
    cout<<"Could not connect to Database"<<endl;
    return -1;

And if I run my code it says: “Failed to connect to mydatabase” and also “illegal pointer to a class db 0x86” or smth

Maybe I’m wrong (@linev can correct me) but I don’t think "uid", "upw" are the right arguments…


root-config --features | grep -i pgsql
root-config --has-pgsql # do you get "yes"?

Thanks guys. It seems to be that I’ve already solved the problem))) Thank U all for your support.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.