X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DBE67D1B494 for ; Wed, 10 Dec 2003 05:16:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 86805-03 for ; Wed, 10 Dec 2003 01:15:50 -0400 (AST) Received: from chi.greatindianproducts.com (unknown [61.16.132.195]) by svr1.postgresql.org (Postfix) with ESMTP id 64D23D1B444 for ; Wed, 10 Dec 2003 01:15:48 -0400 (AST) Received: from chi.greatindianproducts.com (chi.greatindianproducts.com [127.0.0.1]) by chi.greatindianproducts.com (8.12.5/8.12.5) with ESMTP id hBA5Q6i4001509 for ; Wed, 10 Dec 2003 10:56:07 +0530 Received: (from ashok@localhost) by chi.greatindianproducts.com (8.12.5/8.12.5/Submit) id hBA5Q2rk001507; Wed, 10 Dec 2003 10:56:02 +0530 X-Authentication-Warning: chi.greatindianproducts.com: ashok set sender to ashok@kalculate.com using -f Subject: error in code From: Ashok Chauhan To: pgsql-admin Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Date: 10 Dec 2003 10:56:01 +0530 Message-Id: <1071033961.1264.7.camel@chi> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/130 X-Sequence-Number: 11638 **************************** # include # include # include int main() { PGresult *result; PGconn *conn; int feild; printf("successful"); conn = PQconnectdb ("ashok"); result = PQexec (conn, "select * from bill"); feild = PQntuples (result); printf("%d",feild); PQclear (result); PQfinish (conn); printf("hello"); return 1; } I written a code and compile with following command, it complied and create 'a.out' file but when i run the a.out it give nothing. command:- "gcc program.c -I /usr/include/pgsql/include -L /usr/lib/libpq.a -lpq" plz help me. Ashok