public inbox for [email protected]  
help / color / mirror / Atom feed
From: Vutharkar Goutham <[email protected]>
To: [email protected]
Subject: Select statement error !!!!
Date: Wed, 24 Sep 2003 10:27:04 +0000
Message-ID: <[email protected]> (raw)

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.




view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Select statement error !!!!
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox