X-Original-To: pgsql-hackers-win32-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0F93D52E88 for ; Thu, 28 Jul 2005 10:55:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59237-08 for ; Thu, 28 Jul 2005 13:55:50 +0000 (GMT) Received: from smtp12.wanadoo.fr (smtp12.wanadoo.fr [193.252.22.20]) by svr1.postgresql.org (Postfix) with ESMTP id BAEB352E81 for ; Thu, 28 Jul 2005 10:55:48 -0300 (ADT) Received: from me-wanadoo.net (unknown [127.0.0.1]) by mwinf1203.wanadoo.fr (SMTP Server) with ESMTP id EA97E1C000BC for ; Thu, 28 Jul 2005 15:55:51 +0200 (CEST) Received: from NSTMike (APoitiers-101-1-1-5.w193-251.abo.wanadoo.fr [193.251.25.5]) by mwinf1203.wanadoo.fr (SMTP Server) with ESMTP id 8EB301C00094 for ; Thu, 28 Jul 2005 15:55:51 +0200 (CEST) X-ME-UUID: 20050728135551584.8EB301C00094@mwinf1203.wanadoo.fr Message-ID: <017101c5937c$0f0f35d0$027ba8c0@NSTMike> Reply-To: "Michael GUIARD" From: "Michael GUIARD" To: Subject: LIBPQ - FETCH INTO Date: Thu, 28 Jul 2005 15:55:42 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_016E_01C5938C.CEBCEE80" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.225 tagged_above=0 required=5 tests=AWL, HTML_60_70, HTML_MESSAGE, SUBJ_ALL_CAPS X-Spam-Level: X-Archive-Number: 200507/54 X-Sequence-Number: 3297 This is a multi-part message in MIME format. ------=_NextPart_000_016E_01C5938C.CEBCEE80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi ! first, thank you Magnus for your help :) the use of cursors and fetch commands works fine for me.=20 Is it possible to know the result length (rows count) before any = retreive ? Another thing, now I'd like to retreive the results, using FETCH = command, into a structure. For example I ask for selecting 2 fields, = instead of using PQgetvalue(res, i, j), I'd like to retreive all fields = in a C structure. I saw the FETCH INTO command, I tried to use it with the PQexecParams = but I did not succeeded in. Is it possible ? if yes how ? thanks Mike ------=_NextPart_000_016E_01C5938C.CEBCEE80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi !
 
first, thank you Magnus for your = help=20 :)
 
the use of cursors and fetch commands = works fine=20 for me.
Is it possible to know the result = length (rows=20 count) before any retreive ?
 
Another thing, now I'd like to retreive = the=20 results, using FETCH command, into a structure. For example I ask for = selecting=20 2 fields, instead of using PQgetvalue(res, i, j), I'd like to retreive = all=20 fields in a C structure.
I saw the FETCH INTO command, I tried = to use it=20 with the PQexecParams but I did not succeeded in.
 
Is it possible ? if yes how = ?
thanks
 
Mike
 
 
 
 
------=_NextPart_000_016E_01C5938C.CEBCEE80--