X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id DF46AD1B94F for ; Wed, 24 Sep 2003 10:27:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 32415-04 for ; Wed, 24 Sep 2003 07:27:09 -0300 (ADT) Received: from hotmail.com (sea1-f17.sea1.hotmail.com [207.68.163.17]) by svr1.postgresql.org (Postfix) with ESMTP id 70AF9D1B8D0 for ; Wed, 24 Sep 2003 07:27:06 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 24 Sep 2003 03:27:05 -0700 Received: from 203.193.129.35 by sea1fd.sea1.hotmail.msn.com with HTTP; Wed, 24 Sep 2003 10:27:04 GMT X-Originating-IP: [203.193.129.35] X-Originating-Email: [goutham4u@hotmail.com] From: "Vutharkar Goutham" To: pgsql-docs@postgresql.org Subject: Select statement error !!!! Date: Wed, 24 Sep 2003 10:27:04 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 24 Sep 2003 10:27:05.0265 (UTC) FILETIME=[66749210:01C38286] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=BAYES_30, PLING_PLING X-Spam-Level: * X-Archive-Number: 200309/58 X-Sequence-Number: 2014 Hello, I am doing a simple program with PostgreSql wherein i am giving a select statement as an argument to PQexec like this char query[1024]; strcpy(query,"Select * from Udp_Table"); res = PQexec(conn,query); if(!res || PQresultStatus(res)! = PGRES_COMMAND_OK) { fprintf(stderr,"Select Failed.\n"); PQclear(res); exit(1); } now if i try to execute the above statement it is giving me always teh select failed message. I dont know where the problem is? But when i try to store some other query in array like update statement or insert statement or any other statement it is working and giving the results i want to see. But i dont know what is wrong with the select statement i think it should work isn't it? Can anybody out there please help me to solve this problem. Thank You, Goutham.V MSIT. _________________________________________________________________ Get personal loans. It's hassle-free. http://server1.msn.co.in/msnleads/citibankpersonalloan/citibankploanjuly03.asp?type=txt It's approved instantly.