Received: from hotmail.com (law-f220.hotmail.com [209.185.130.158]) by hub.org (8.9.3/8.9.3) with SMTP id FAA00339 for ; Mon, 24 May 1999 05:21:35 -0400 (EDT) (envelope-from anna_langer@hotmail.com) Received: (qmail 92751 invoked by uid 0); 24 May 1999 09:22:04 -0000 Message-ID: <19990524092204.92750.qmail@hotmail.com> Received: from 195.242.55.62 by www.hotmail.com with HTTP; Mon, 24 May 1999 02:22:04 PDT X-Originating-IP: [195.242.55.62] From: "Anna Langer" To: pgsql-general@postgreSQL.org Subject: Problems with INSERT INTO? Date: Mon, 24 May 1999 02:22:04 PDT Mime-Version: 1.0 Content-type: text/plain; format=flowed; Hi! We are not really sure if this question is right for this mailinglist. We have some problem with INSERT INTO and we dont know how to solve it.We are writing it in a C-program. We are trying to get an integer from a file and put it into a database. And we are sure that we get a interger into our program. When we created the table in the database we set the attribut to int4. We get the problem when we trying to move the interger to the database. int a=500; PQexec(conn, "INSERT INTO octets VALUES(a)"); But the program works when we do like this: PQexec(conn, "INSERT INTO octets VALUES(500)"); It feels like we need to convert int a in some way, byt we dont know how. We are beginners with Postgresql. /Anna and Maria ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com