🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2625

Re: Oracle Database : table creating Problem

#2625
From: Roy
Date: Wed, 23 Aug 2000 00:00
41 lines
1710 bytes
Hi Ban ,
    Should by executeUpdate(sqlText) which did not return a result set.

Thanks

Ban wrote:

> I am using JBuilder3.5, Oracle 8.05 to develop a program to create a table,
> below is the codes:
>
>       Statement  stmt=null;
>       String dburl="jdbc:odbc:chan";
>       Connection con=null;
>       String s=null;
>       try
>       {
>        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>        con = DriverManager.getConnection(dburl,"webresource","textreport");
>        stmt=con.createStatement();
>        s = "CREATE TABLE myTable " +
>      "(myID VARCHAR2(10), myTYPE VARCHAR2(4), mycontent VARCHAR2(10) )";
>        stmt.executeQuery(s);
>
>       }
>       catch(SQLException e)
>       {
>         System.out.println(e);
>       }
>
> But, when running ,there is an SQLException which is   "No ResultSet
> Produced".
> I don't know why. Please give me a hand.
> Thanks in advance.
>
> Xuegang Ban
> Department of Civil and Environmental Engineering
> University of Wisconsin at Madison
>
> Email: ban@cae.wsic.edu
> Tel: 608-260-9123 (H)
>        608-262-3967 (O)
Technical Details
Message-ID: <39A3A1C6.B8DEB745@singnet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39a067f9$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,4f4725c9f78b86d4
X-Google-Attributes: gid1089d0,public
From: Roy <Roy@singnet.com>
Subject: Re: Oracle Database : table creating Problem
Date: 2000/08/23
Message-ID: <39A3A1C6.B8DEB745@singnet.com>
X-Deja-AN: 661477822
Content-Transfer-Encoding: 7bit
References: <39a067f9$1_1@dnews>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 23 Aug 2000 02:46:08 -0800, 203.126.155.39
Organization: Roy
MIME-Version: 1.0
Reply-To: Roy
Newsgroups: borland.public.jbuilder.java.api