Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
writing in oracle database with java
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Stefan Seidel  
View profile   Translate to Translated (View Original)
 More options 29 Aug 2003, 16:14
Newsgroups: comp.databases.oracle.misc
From: "Stefan Seidel" <ssei...@uni-muenster.de>
Date: Fri, 29 Aug 2003 17:13:44 -0700
Local: Sat 30 Aug 2003 01:13
Subject: writing in oracle database with java
Hi NG,

i'm trying to create tables and to insert data into these tables using
oracle.jdbc.

(first a "create table" statement and then couple of "insert into"
statements)

There are no problems except for the last table. The table is created but
the data is not inserted.

This happens regardless of if i create 3,4,5 etc. tables with the last
table.

what am i doing wrong?

Stefan


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Morgan  
View profile   Translate to Translated (View Original)
 More options 29 Aug 2003, 16:50
Newsgroups: comp.databases.oracle.misc
From: Daniel Morgan <damor...@exxesolutions.com>
Date: Fri, 29 Aug 2003 08:51:16 -0700
Local: Fri 29 Aug 2003 16:51
Subject: Re: writing in oracle database with java

Oracle version and edition?
Code sample?
JDBC driver being used?

Crystal ball is broken.

But I would advise you to not perform DDL on-the-fly. Tables should not be
built across a JDBC link as part of an application. Build them in SQL*Plus
and then leave them alone.
--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
http://www.outreach.washington.edu/extinfo/certprog/aoa/aoa_main.asp
damor...@x.washington.edu
(replace 'x' with a 'u' to reply)


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Seidel  
View profile   Translate to Translated (View Original)
 More options 29 Aug 2003, 16:58
Newsgroups: comp.databases.oracle.misc
From: "Stefan Seidel" <ssei...@uni-muenster.de>
Date: Fri, 29 Aug 2003 17:56:52 -0700
Local: Sat 30 Aug 2003 01:56
Subject: Re: writing in oracle database with java
Sorry, thought it might be something typical...

Oralce Ver. 9.0.1
jdbc version: ojdbc 1.4

Code example:

        for(int i = 0;i< hierarchie.size();i++){

           // CREATE TABLE
            tableName = "DWH.snowflake_dim_" + i;
            statementString = "CREATE TABLE " +tableName +
                            "(ID INTEGER,UEBER INTEGER)";
            statement.executeUpdate(statementString);
            Vector ebene = (Vector)hierarchie.elementAt(i);

           // INSERT INTO
            for(int z = 0;z < ebene.size(); z++){
                statementString = "INSERT INTO "+tableName+" VALUES ("+
                                  ((Eintrag)(ebene.elementAt(z))).id+","+
                                  ((Eintrag)(ebene.elementAt(z))).ueber+")";

                statement.executeUpdate(statementString);
            }

"Daniel Morgan" <damor...@exxesolutions.com> wrote in message

news:3F4F7674.21294305@exxesolutions.com...


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rene Nyffenegger  
View profile   Translate to Translated (View Original)
 More options 29 Aug 2003, 17:59
Newsgroups: comp.databases.oracle.misc
From: Rene Nyffenegger <rene.nyffeneg...@gmx.ch>
Date: 29 Aug 2003 16:59:55 GMT
Local: Fri 29 Aug 2003 17:59
Subject: Re: writing in oracle database with java

> Hi NG,

> i'm trying to create tables and to insert data into these tables using
> oracle.jdbc.

> (first a "create table" statement and then couple of "insert into"
> statements)

> There are no problems except for the last table. The table is created but
> the data is not inserted.

> This happens regardless of if i create 3,4,5 etc. tables with the last
> table.

> what am i doing wrong?

Stefan,

I'd say you forgot to commit the inserts. You see the other data because
create table does an implicit commit.

hth
Rene

--
  Rene Nyffenegger
  http://www.adp-gmbh.ch


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maximus  
View profile   Translate to Translated (View Original)
 More options 29 Aug 2003, 23:08
Newsgroups: comp.databases.oracle.misc
From: "Maximus" <asdfasd...@eqeqweqwe.com>
Date: Fri, 29 Aug 2003 22:08:44 GMT
Local: Fri 29 Aug 2003 23:08
Subject: Re: writing in oracle database with java
"Stefan Seidel" <ssei...@uni-muenster.de> wrote in message

news:bint5i$qla$1@redenix.uni-muenster.de...

((Eintrag)(ebene.elementAt(z))).ueber+")";

>                 statement.executeUpdate(statementString);
>             }

Where are the commits?

    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Kennedy  
View profile   Translate to Translated (View Original)
 More options 30 Aug 2003, 03:38
Newsgroups: comp.databases.oracle.misc
From: "Jim Kennedy" <kennedy-down_with_spammers@no_spam.comcast.net>
Date: Sat, 30 Aug 2003 02:38:38 GMT
Local: Sat 30 Aug 2003 03:38
Subject: Re: writing in oracle database with java
When he does the next create table statement.  So maybe that is why he is
not seeing the last set of data, no commit.  What is an uber integer?
Jim

"Maximus" <asdfasd...@eqeqweqwe.com> wrote in message

news:M9Q3b.58367$la.1191531@news1.calgary.shaw.ca...

((Eintrag)(ebene.elementAt(z))).id+","+


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maximus  
View profile   Translate to Translated (View Original)
 More options 30 Aug 2003, 06:18
Newsgroups: comp.databases.oracle.misc
From: "Maximus" <asdfasd...@eqeqweqwe.com>
Date: Sat, 30 Aug 2003 05:18:32 GMT
Local: Sat 30 Aug 2003 06:18
Subject: Re: writing in oracle database with java
"Jim Kennedy" <kennedy-down_with_spammers@no_spam.comcast.net> wrote in
message news:O6U3b.301799$YN5.207911@sccrnsc01...

> When he does the next create table statement.  So maybe that is why he is
> not seeing the last set of data, no commit.  What is an uber integer?
> Jim

Makes sense, "executeUpdate('COMMIT')" after the inserts should fix that.

ueber integer... sounds like German for above, over, super... probably a
foreign key to the parent/master?


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Kuhler  
View profile   Translate to Translated (View Original)
 More options 3 Sep 2003, 01:16
Newsgroups: comp.databases.oracle.misc
From: Richard Kuhler <no...@nowhere.com>
Date: Wed, 03 Sep 2003 00:16:21 GMT
Local: Wed 3 Sep 2003 01:16
Subject: Re: writing in oracle database with java
Stefan Seidel wrote:

<snip>

<snip>

I'd recommend you switch to using bind variables (set methods).  If this
is a one time script you mike be ok without it but you're probably
scrambling the SGA pretty good here.  As for the inserts missing, the
other posters are almost certainly right about the commit.  Although,
since JDBC connections are auto-commit by default, this would assume
that you've changed it using the setAutoCommit method.  That would seem
to indicate that you know about commits though and just didn't do it
here.  Strange.

Richard Kuhler


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google