Re: libpq and PQgetvalue

From: "Leonel Nunez" <postgres(at)enelserver(dot)com>
To: "Alex Nu" <notulei(at)yahoo(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: libpq and PQgetvalue
Date: 2004-04-30 18:09:05
Message-ID: 33741.201.128.135.25.1083348545.squirrel@enelserver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

>
>
>
> Hola,
>
> Intentado usar los ejemplos de libpq.
> Especificamente el testlibpq3.c
> en donde se declara un "cursor" binario
>
> res = PQexec(conn,
> "DECLARE mycursor BINARY CURSOR FOR select * from
> test1");
>
> El problema es cuando se usa PQgetvalue, los valores
> que regresa no son los valores reales de la base de
> datos;
>
>
> Alguien tiene alguna experiencia usando libpq ?
>
> El ejemplo funciona si el cursor se declar no
> binario y se hace un atoi(PQgetvalue) o atof.
>
> Gracias
>
> Alex
>

Declaraste un Cursor
bien
un cursor no regresa nada

Ya diste Fetch ?

res = PQexec ( conn , "Fetch 1 in mycursor" )

o

res = PQexec ( conn , "fetch all in mycursor");

,''`. Leonel Nunez
: :' : http://enelserver.com
`. `' DEBIAN GNU/LINUX
`- A REAL FREE OS

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alex Nu 2004-04-30 18:48:44 libpq and PQgetvalue
Previous Message Yesid E. Ortiz M. 2004-04-30 13:27:11 Re: Generar un consecutivo