From: | "suhail sarwar" <sarwar(at)postmaster(dot)co(dot)uk> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Inserting data into a postgres table using java |
Date: | 2001-04-28 12:38:06 |
Message-ID: | PM.6715.988461486@pmweb8.uk1.bibliotech.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 Test1 is:
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
From | Date | Subject | |
---|---|---|---|
Next Message | Brett W. McCoy | 2001-04-28 14:08:31 | Re: install question |
Previous Message | Eric Naujock | 2001-04-28 11:59:15 | Re: SELECT performance problem on a join |