When executed, it issues No connection, while the network between the computer and the virtual machine (on which ./readwritepaths is running) is installed (ip of the main computer on which the base is installed 192.168.143.92). The pgAdmin 3 program started with the server running 192.168.143.92 (localhost: 5432) while the readwritepaths program is running.
conn = PQconnectdb("hostaddr=192.168.143.92 port=5432 connect_timeout=5 dbname=NexentaSearch user=DKOI password=21111991"); if (PQstatus(conn) == CONNECTION_BAD) { puts("No connection"); exit(0); }
Tell me how to make the program workable?