Received: from mail.hkcccc.org (root@[202.64.241.126]) by hub.org (8.8.8/8.7.5) with ESMTP id AAA11284 for ; Wed, 8 Apr 1998 00:38:32 -0400 (EDT) Received: from hkcccc.org ([202.64.241.101]) by mail.hkcccc.org (8.8.7/8.8.7) with ESMTP id MAA01455 for ; Wed, 8 Apr 1998 12:46:41 +0800 Message-ID: <352AFF2C.AE00EDB4@hkcccc.org> Date: Wed, 08 Apr 1998 12:38:04 +0800 From: Christopher Luk Organization: The Hong Kong Council of the Church of Christ in China X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 To: pgsql-interfaces@postgreSQL.org Subject: libpq can't do "insert" References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have a question on the libpq( c language) libraries. The included testlibpq.c can extract data from the postgres95 database. Modifing the testlibpq.c enable me to extract data from any database in the postgres95. Hovever, when I changed the "select" query to "insert" query, the code seems doesn't work. Could somebody tell me is it another way to do "insert" or something I have missed? eg. res=PQexec(conn, "DECLARE myportal CURSOR FOR select * ......."); was changed to res=PQexec(conn, "DECLARE myportal CURSOR FOR insert into ......."); But can't do insert. -- Regards, Christopher Luk System Analyst - The Hong Kong Council of the Church of Christ in China Phone : (852) 2397-1022 Fax : (852) 2397-7405 mailto:wluk@hkcccc.org URL : http://www.hkcccc.org (Chinese based)