Inserting data into a postgres table using java - Mailing list pgsql-novice

From suhail sarwar
Subject Inserting data into a postgres table using java
Date
Msg-id PM.6715.988461486@pmweb8.uk1.bibliotech.net
Whole thread Raw
List pgsql-novice
Hi,

 I am having problems inserting data into a postgres table created using java. The create table part of the code works
fine,its only when I am inserting values into the table that nothing happens. The code I am using to populate the table
Test1is: 

PreparedStatement stt = db.prepareStatement("INSERT INTO Test1 " + "VALUES (100, name, 55)");
stt.executeUpdate();

The code for creating the table is:
PreparedStatement st = db.prepareStatement("CREATE TABLE Test1 " + "(CUS_NO INTEGER, NAME VARCHAR(20), AGE INTEGER)");
ResultSet rs = st.executeQuery();

I don't know why the data does not get inserted into the table, even though the table gets created.

Any Ideas??

Kind Regards

Sarwar



pgsql-novice by date:

Previous
From: tompoe
Date:
Subject: Re: install question
Next
From: "suhail sarwar"
Date:
Subject: Attribute 'name' not found ERROR for postgres and java