Segementation fault in PQgetvalue()

From: Nikhil Bokare <nbokare(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Segementation fault in PQgetvalue()
Date: 2008-03-13 06:41:55
Message-ID: 463adc14-01d5-4bc8-952a-a3d718e99e38@s8g2000prg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This is what I'm trying to:

char lmt_str[100];
sprintf(lmt_str,"%s",PQgetvalue(res, 0, nFields-1));
//the last field is of type timestamp

This is giving segmentation fault.
I'm confused....

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2008-03-13 07:19:11 Re: Trigger to run @ connection time?
Previous Message Ow Mun Heng 2008-03-13 05:39:40 Re: Column Statistics - How to dertermine for whole database