Problems with INSERT INTO?

From: "Anna Langer" <anna_langer(at)hotmail(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Problems with INSERT INTO?
Date: 1999-05-24 02:22:04
Message-ID: 19990524092204.92750.qmail@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brett W. McCoy 1999-05-24 02:26:08 Re: [GENERAL] Full Text Searches
Previous Message Andy Lewis 1999-05-24 00:21:08 Full Text Searches

Browse pgsql-interfaces by date

  From Date Subject
Next Message MAILER-DAEMON 1999-05-24 04:28:54 Undeliverable Message
Previous Message Michael Meskes 1999-05-23 09:12:31 Re: [INTERFACES] ECPG feature