> I created a database and added 3 tables to it named weather, cities and
> teamdatabase.
> I make the connection with database ...
> After that i tried to execute the command SELECT * FROM weather by giving as
> res = PQexec(conn,"SELECT * FROM weather");
Further you could use,
1) PQresultStatus(res)
2) PQntuples(res)
3) PQnfields(res)
4) PQgetvalue(res, n, n)
For details, please refer the below link:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=programmer-client.html
Refer Asynchronous Query Processing in the above link for even more
specific details.
regards,
bhuvaneswaran