Skip site navigation (1) Skip section navigation (2)

Re: Attribute 'name' not found ERROR for postgres and java

From: "Albert REINER" <areiner(at)tph(dot)tuwien(dot)ac(dot)at>
To: suhail sarwar <sarwar(at)postmaster(dot)co(dot)uk>
Cc: PostgreSQL-Novice <pgsql-novice(at)postgreSQL(dot)org>
Subject: Re: Attribute 'name' not found ERROR for postgres and java
Date: 2001-04-28 20:33:53
Message-ID: 20010428223353.A1534@frithjof (view raw or flat)
Thread:
Lists: pgsql-novice
I don't think this has anything to do with the java part; you'll
probably see the same with psql alone.

I guess you really want to do something like

insert into test1 (name, age) values ('Granma', 100);

if name and age are the names of the columns you want to set. Note the quotes
for the string.

HTH,

Albert.

On Sat, Apr 28, 2001 at 12:58:54PM +0100, suhail sarwar wrote:
> Hi,
> 
> I am getting this sql exception  "Attribute 'name' not found" and I can't seem to figure it out at all. I have a java program that creates a table in postgresql using a prepared statement and that bit works. Then I have added another prepared statement to populate the table with values (see below):
> PreparedStatement stt = db.prepareStatement("INSERT INTO Test1 " + "VALUES (100, name, age)");
...

In response to

pgsql-novice by date

Next:From: suhail sarwarDate: 2001-04-29 15:00:04
Subject: Multiple SQL statements in a java program for postgresql DB
Previous:From: Steve WaldmanDate: 2001-04-28 20:10:31
Subject: Re: Attribute 'name' not found ERROR for postgres and java

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group