Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1206 > unrolled thread

Can a ResultSet be passed back to a main program

Started byLinus Flustillbe <admin@nacs.dyndns-office.com>
First post2011-10-10 02:32 +0000
Last post2011-10-12 18:55 -0700
Articles 15 — 5 participants

Back to article view | Back to comp.lang.java.help


Contents

  Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-10 02:32 +0000
    Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-10 02:37 +0000
    Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-10 06:28 +0000
      Re: Can a ResultSet be passed back to a main program Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-10-10 14:26 -0300
        Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-10 19:21 +0000
    Re: Can a ResultSet be passed back to a main program markspace <-@.> - 2011-10-10 07:27 -0700
      Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-10 17:06 +0000
        Re: Can a ResultSet be passed back to a main program Lew <lewbloch@gmail.com> - 2011-10-10 10:10 -0700
          Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-10 19:23 +0000
            Re: Can a ResultSet be passed back to a main program Lew <lewbloch@gmail.com> - 2011-10-10 14:26 -0700
              Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-11 00:43 +0000
    Re: Can a ResultSet be passed back to a main program Roedy Green <see_website@mindprod.com.invalid> - 2011-10-12 09:52 -0700
      Re: Can a ResultSet be passed back to a main program Lew <lewbloch@gmail.com> - 2011-10-12 10:28 -0700
        Re: Can a ResultSet be passed back to a main program Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-13 01:24 +0000
          Re: Can a ResultSet be passed back to a main program Lew <lewbloch@gmail.com> - 2011-10-12 18:55 -0700

#1206 — Can a ResultSet be passed back to a main program

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-10 02:32 +0000
SubjectCan a ResultSet be passed back to a main program
Message-ID<4e92594f$0$14660$9a566e8b@news.aliant.net>
Looking for some ideas here.
What I would like to do (and I'm just experimenting a bit). 
No, this is not homework, I'm building a little application to 
increase my knowledge of Java (it will be a GUI when I'm done) but
it's going to read some Oracle tables so I need to know how that stuff
works.


1.  Create a class that
    a) creates a connection to an oracle database
    b) run a simple query to get a result set
    c) pass the result set back to a calling program.

2.  Create a main program that
   a) creates a new connection via the class above
   b) iterates through the result set which is passed back as the return
type from 1

Here's what I have so far

This is the class that creates the connection

 =============================

package mainClasses;
import java.sql.*;
public class TableConnect {

      public TableConnect() throws ClassNotFoundException, SQLException
      {
    	  Class.forName("oracle.jdbc.driver.OracleDriver");
    	  //
    	  // or
    	  // DriverManager.registerDriver
    	  // (new oracle.jdbc.driver.OracleDriver());
    	   
    	  String url = "jdbc:oracle:thin:@XXXXXXXX:1521:xxxxxxxx";
    	  Connection conn =
    	  DriverManager.getConnection(url,"xxxxx", "xxxxxx");
    	   
    	  Statement stmt = conn.createStatement();
    	  ResultSet rset =
    	  stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    	  while (rset.next()) {
    	  System.out.println (rset.getString(1));
    	  }
    	  stmt.close();
    	  System.out.println ("Ok.");
    	  }
    	  }

===============

And this is the class that calls it
 
package testing;

import java.sql.*;

import mainClasses.*;
public class ConnectionTest  {
    public static void main(String[] args) throws
ClassNotFoundException, SQLException
    {
    	  Class.forName("oracle.jdbc.driver.OracleDriver");
    	  //
    	  // or
    	  // DriverManager.registerDriver
    	  // (new oracle.jdbc.driver.OracleDriver());
    	   

          TableConnect myConnection = new TableConnect();
    	  }
    
    
}
    	  

I have organized my code into three packages
mainClasses
helperClasses
testing

Because the ConnectionTest class is just a test, I put it in the testing
package.  Doesn't matter but will help understand what I am trying to
do.

So my connection works  (running it on the Eclipse IDE platform )

Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE	11.2.0.1.0	Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Ok

=================

but the thing is, all that iteration is being done in the TableConnect
class.  I want it (it being the TableConnect class) to send back the
result set to the calling program so that I can work with it back there.
I was thinking of somehow changing the ConnectionTest class to be of
type ResultSet rather than void and then in my main program, I could do
something like this

ResultSet myResultSet = new ConnectionClass();

But I'm not sure how to go about doing this.  I would
be happy to read a resource on it if someone knows of one.

So to recap:

I would like to have a Java Class called ConnectionClass that will
a)  open a connection to an oracle database.
b)  run a query on it
c)  pass the Result Set back to a calling program that
invokes the ConnectionClass via a statement like this

ResultSet myResultSet = new ConnectionClass();

I will continue to experiment and will post my findings if I can figure
this out.  Is what I am trying to do even possible?  Any assistance
would be appreciated.

Thanks

-- 
********************************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
*********************************************************************************

[toc] | [next] | [standalone]


#1207

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-10 02:37 +0000
Message-ID<4e925a5b$0$14660$9a566e8b@news.aliant.net>
In reply to#1206
On 2011-10-10, Linus Flustillbe <admin@nacs.dyndns-office.com> wrote:
>     	   
>     	  String url = "jdbc:oracle:thin:@XXXXXXXX:1521:xxxxxxxx";
>     	  Connection conn =
>     	  DriverManager.getConnection(url,"xxxxx", "xxxxxx");
>     	   

Obviously the lines

    String url = "jdbc:oracle:thin:@XXXXXXXX:1521:xxxxxxxx";
    Connection conn =
         DriverManager.getConnection(url,"xxxxx", "xxxxxx");


contain obfuscated connection details just in case anyone thinks
the x's are real.

Thanks again


-- 
********************************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
*********************************************************************************

[toc] | [prev] | [next] | [standalone]


#1209

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-10 06:28 +0000
Message-ID<4e92909e$0$15519$9a566e8b@news.aliant.net>
In reply to#1206
On 2011-10-10, Linus Flustillbe <admin@nacs.dyndns-office.com> wrote:
> I will continue to experiment and will post my findings if I can figure
> this out.  Is what I am trying to do even possible?  Any assistance
> would be appreciated.
>
> Thanks
>

I have been succesful.... here is my code

This is the class that does the connection

package mainClasses;
import java.sql.*;
public class TableConnect {


	public Statement getStatement() {
		return statement;
	}

	public void setStatement(Statement statement) {
		this.statement = statement;
	}

	private Statement statement;

	public TableConnect() throws ClassNotFoundException,
SQLException
	{
		Class.forName("oracle.jdbc.driver.OracleDriver");
		Statement tstate;

		String url = "jdbc:oracle:thin:@xxxxxxx1:1521:xxxxxxx";
		Connection conn =
			DriverManager.getConnection(url,"xxxxxxx",
"xxxxxxx");
        
		tstate = conn.createStatement();
        setStatement(tstate);
	}

	public ResultSet GetResultSet(Statement stmt, String tableName)
throws SQLException {
		String query = "select * from " + tableName ;
		return stmt.executeQuery(query);
	}
}

====================

And here is my testing code

package testing;

import java.sql.*;

import mainClasses.*;
public class ConnectionTest  {
    public static void main(String[] args) throws
ClassNotFoundException, SQLException
    {
    	  Class.forName("oracle.jdbc.driver.OracleDriver");
    	  String tableName="LU_MEDIA_USAGE";
          TableConnect myConnection = new TableConnect();
          Statement stmt = myConnection.getStatement();
          ResultSet rset = myConnection.GetResultSet(stmt, tableName);
          while (rset.next()) {
    	    System.out.println (rset.getString(1));
    	  }
  		  stmt.close();
    	  }
}

When I run ConnectionTest, I get the following output

CL
COM
CS
DRA
HIS
HOR
NF
OPS
REC
ROM
SF
THR
TR

These are just 3 character codes that I am using as "enum" types
for my application.  Suggestions for improvement are welcome.
Like I would have preferred to do one method call and have the stmt
be internal to that i.e. without needing a variable in the main program
called stmt that gets set from a method call then then passed to a 
another method.  Maybe if I sleep on it, the answer will come to me.

 

-- 
********************************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
*********************************************************************************

[toc] | [prev] | [next] | [standalone]


#1222

FromArved Sandstrom <asandstrom3minus1@eastlink.ca>
Date2011-10-10 14:26 -0300
Message-ID<5VFkq.4917$j77.4852@newsfe12.iad>
In reply to#1209
On 11-10-10 03:28 AM, Linus Flustillbe wrote:
> On 2011-10-10, Linus Flustillbe <admin@nacs.dyndns-office.com> wrote:
>> I will continue to experiment and will post my findings if I can figure
>> this out.  Is what I am trying to do even possible?  Any assistance
>> would be appreciated.
>>
>> Thanks
>>
> 
> I have been succesful.... here is my code
> 
> This is the class that does the connection
> 
> package mainClasses;
> import java.sql.*;
> public class TableConnect {
> 
> 
> 	public Statement getStatement() {
> 		return statement;
> 	}
> 
> 	public void setStatement(Statement statement) {
> 		this.statement = statement;
> 	}
> 
> 	private Statement statement;
> 
> 	public TableConnect() throws ClassNotFoundException,
> SQLException
> 	{
> 		Class.forName("oracle.jdbc.driver.OracleDriver");
> 		Statement tstate;
> 
> 		String url = "jdbc:oracle:thin:@xxxxxxx1:1521:xxxxxxx";
> 		Connection conn =
> 			DriverManager.getConnection(url,"xxxxxxx",
> "xxxxxxx");
>         
> 		tstate = conn.createStatement();
>         setStatement(tstate);
> 	}
> 
> 	public ResultSet GetResultSet(Statement stmt, String tableName)
> throws SQLException {
> 		String query = "select * from " + tableName ;
> 		return stmt.executeQuery(query);
> 	}
> }
> 
> ====================
> 
> And here is my testing code
> 
> package testing;
> 
> import java.sql.*;
> 
> import mainClasses.*;
> public class ConnectionTest  {
>     public static void main(String[] args) throws
> ClassNotFoundException, SQLException
>     {
>     	  Class.forName("oracle.jdbc.driver.OracleDriver");
>     	  String tableName="LU_MEDIA_USAGE";
>           TableConnect myConnection = new TableConnect();
>           Statement stmt = myConnection.getStatement();
>           ResultSet rset = myConnection.GetResultSet(stmt, tableName);
>           while (rset.next()) {
>     	    System.out.println (rset.getString(1));
>     	  }
>   		  stmt.close();
>     	  }
> }
> 
> When I run ConnectionTest, I get the following output
> 
> CL
[ SNIP ]
> TR
> 
> These are just 3 character codes that I am using as "enum" types
> for my application.  Suggestions for improvement are welcome.
> Like I would have preferred to do one method call and have the stmt
> be internal to that i.e. without needing a variable in the main program
> called stmt that gets set from a method call then then passed to a 
> another method.  Maybe if I sleep on it, the answer will come to me.

The above that you noted is certainly one improvement to make; it's good
that you remarked upon it. As a rule of thumb, if a variable is internal
to class A, it's a code smell to retrieve it in class B with a getter
method, only to simply supply it as a parameter in another method called
on A by B.

On this point I think you'll eventually see by looking at
TableConnect.java that you already made the statement available to any
other method in the class, and there was no need for that parameter on
the GetResultSet method.

General nomenclature notes in Java: method names in Java are also
camel-case, which you've been using elsewhere.

In a more general sense, when working with JDBC or any other API where
you acquire, use and dispose of connnections, it is fairly common
practise to write up a little utility class that has a few methods to do
these things. You're on the way to doing that with TableConnect. Such a
class would not contain any logic for specific statements or result
sets, usually - that kind of thing is business logic. So I would pull
everything pertaining to Statement and ResultSet out of TableConnect,
and for this small test case keep it in the main class.

Also, get in the habit of not creating your query strings by
concatenating static strings and supplied variables. Here in this
example it's a non-issue, but for a GUI app or a web app, maybe sooner
or later that variable that is meant to be a table name is a
user-supplied string that contains something else entirely. Word to the
wise.

AHS
-- 
I tend to watch a little TV... Court TV, once in a while. Some of the
cases I get interested in.
-- O. J. Simpson

[toc] | [prev] | [next] | [standalone]


#1226

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-10 19:21 +0000
Message-ID<4e9345bd$0$13642$9a566e8b@news.aliant.net>
In reply to#1222
On 2011-10-10, Arved Sandstrom <asandstrom3minus1@eastlink.ca> wrote:
>
> The above that you noted is certainly one improvement to make; it's good
> that you remarked upon it. As a rule of thumb, if a variable is internal
> to class A, it's a code smell to retrieve it in class B with a getter
> method, only to simply supply it as a parameter in another method called
> on A by B.
>
> On this point I think you'll eventually see by looking at
> TableConnect.java that you already made the statement available to any
> other method in the class, and there was no need for that parameter on
> the GetResultSet method.
>
> General nomenclature notes in Java: method names in Java are also
> camel-case, which you've been using elsewhere.
>
> In a more general sense, when working with JDBC or any other API where
> you acquire, use and dispose of connnections, it is fairly common
> practise to write up a little utility class that has a few methods to do
> these things. You're on the way to doing that with TableConnect. Such a
> class would not contain any logic for specific statements or result
> sets, usually - that kind of thing is business logic. So I would pull
> everything pertaining to Statement and ResultSet out of TableConnect,
> and for this small test case keep it in the main class.
>
> Also, get in the habit of not creating your query strings by
> concatenating static strings and supplied variables. Here in this
> example it's a non-issue, but for a GUI app or a web app, maybe sooner
> or later that variable that is meant to be a table name is a
> user-supplied string that contains something else entirely. Word to the
> wise.
>
> AHS

As I said, this little "project" is so that I can learn how the
jdbc/oracl stuff works in Java.  I took a course a few years ago, but
it's been so long that I've forgotten it.  

Once I start working on my GUI, I'll take all of yours (and others)
suggestions into consideration.  

Thanks for all of your excellent suggestions.

-- 
****************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
****************************************************************

[toc] | [prev] | [next] | [standalone]


#1215

Frommarkspace <-@.>
Date2011-10-10 07:27 -0700
Message-ID<j6uvcp$uh2$2@dont-email.me>
In reply to#1206
On 10/9/2011 7:32 PM, Linus Flustillbe wrote:

> 1.  Create a class that
>      a) creates a connection to an oracle database
>      b) run a simple query to get a result set
>      c) pass the result set back to a calling program.


Most of this information can be found in the Java tutorials.  Are you 
using those?

http://download.oracle.com/javase/tutorial/jdbc/

[toc] | [prev] | [next] | [standalone]


#1219

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-10 17:06 +0000
Message-ID<4e932629$0$13642$9a566e8b@news.aliant.net>
In reply to#1215
On 2011-10-10, markspace <-@> wrote:
> On 10/9/2011 7:32 PM, Linus Flustillbe wrote:
>
>> 1.  Create a class that
>>      a) creates a connection to an oracle database
>>      b) run a simple query to get a result set
>>      c) pass the result set back to a calling program.
>
>
> Most of this information can be found in the Java tutorials.  Are you 
> using those?
>
> http://download.oracle.com/javase/tutorial/jdbc/
>

I actually figured it out on my own without the aid of the tutorials or
JLS.  Google is my friend..   :-)

import java.sql.*;

import mainClasses.*;
public class connectionTest  {
  public static void main(String[] args) 
    throws ClassNotFoundException, SQLException
  {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String tableName="LU_MEDIA_USAGE";
    TableConnect myConnection = new TableConnect();
    Statement stmt = myConnection.getStatement();
    ResultSet rset = myConnection.GetResultSet(stmt, tableName);
    ResultSetMetaData rsetmd = rset.getMetaData();

    while (rset.next()) {
    for (int i=1;i<=rsetmd.getColumnCount();i++)
      {
      System.out.print (rset.getString(i) + " " );
       if ( i == rsetmd.getColumnCount())
       {
          System.out.println("<--->");
       }
      }
    }
    stmt.close();
  }
}

Output

CL Computer Language <--->
COM Comedy <--->
CS Computer Software <--->
DRA Drama <--->
HIS History <--->
HOR Horror <--->
NF Non-Fiction <--->
OPS Operating System <--->
REC Recreational/Gaming <--->
ROM Romance <--->
SF Science Fiction <--->
THR Thriller <--->
TR Theological Resource <--->


-----------------------------------------------
I wanted to just show the values of each column so I googled and found
out about the ResultSetMetaData and used the javadocs to find the
method on the result set to create the metadata.  Interesting stuff,
this jdbc stuff... I can't wait until I actually start designing and
coding the GUI that I plan on.  I'm just learning about the nuts and
bolts right now.

FYI - I have my own local copy of the tutorials in case oracle is ever
down as well as the API.  I haven't gotten around to the JLS yet but
will shortly.




-- 
****************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
****************************************************************

[toc] | [prev] | [next] | [standalone]


#1221

FromLew <lewbloch@gmail.com>
Date2011-10-10 10:10 -0700
Message-ID<27859861.989.1318266650875.JavaMail.geo-discussion-forums@prmr13>
In reply to#1219
Linus Flustillbe wrote:
> import java.sql.*;
> 
> import mainClasses.*;
> public class connectionTest  {
>   public static void main(String[] args) 
>     throws ClassNotFoundException, SQLException
>   {
>     Class.forName("oracle.jdbc.driver.OracleDriver");

Don't call 'forName()' more than once per application run.  Once the class is loaded, it's loaded.  Reloading it doesn't help and the method call spins cycles to no avail.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#1227

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-10 19:23 +0000
Message-ID<4e93464e$0$13642$9a566e8b@news.aliant.net>
In reply to#1221
On 2011-10-10, Lew <lewbloch@gmail.com> wrote:
> Linus Flustillbe wrote:
>> import java.sql.*;
>> 
>> import mainClasses.*;
>> public class connectionTest  {
>>   public static void main(String[] args) 
>>     throws ClassNotFoundException, SQLException
>>   {
>>     Class.forName("oracle.jdbc.driver.OracleDriver");
>
> Don't call 'forName()' more than once per application run.  Once the class is loaded, it's loaded.  Reloading it doesn't help and the method call spins cycles to no avail.
>

Hi Lew, I have to admit I'm not quite sure why that statement is there.
I'll have to read up on it.  I took the bulk fo the class from another
sample I found online and modified it.  Don't explain what it does, I'll
figure it out... gotta learn on my own... I'm sure the tutorials have
something or JLS.

-- 
****************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
****************************************************************

[toc] | [prev] | [next] | [standalone]


#1231

FromLew <lewbloch@gmail.com>
Date2011-10-10 14:26 -0700
Message-ID<21113601.1150.1318281983930.JavaMail.geo-discussion-forums@prmr13>
In reply to#1227
Linus Flustillbe wrote:
> Lew wrote:
>> Linus Flustillbe wrote:
>>> import java.sql.*;
>>> 
>>> import mainClasses.*;
>>> public class connectionTest  {
>>>   public static void main(String[] args) 
>>>     throws ClassNotFoundException, SQLException
>>>   {
>>>     Class.forName("oracle.jdbc.driver.OracleDriver");
>>
>> Don't call 'forName()' more than once per application run.  Once the class is loaded, it's loaded.  Reloading it doesn't help and the method call spins cycles to no avail.
> 
> Hi Lew, I have to admit I'm not quite sure why that statement is there.
> I'll have to read up on it.  I took the bulk fo the class from another
> sample I found online and modified it.  Don't explain what it does, I'll
> figure it out... gotta learn on my own... I'm sure the tutorials have
> something or JLS.

Use the Javadocs, of course.  That's what they're for.  Any time you have to look up a method or type in the API, use the Javadocs as your first recourse.
<http://download.oracle.com/javase/7/docs/api/java/lang/Class.html#forName(java.lang.String)>

Whoever wrote the "sample" you found online must have their head screwed on wrong.  That's the trouble when you copy-and-paste without understanding what you're taking.  You might, as here, grab some bad code and not even know it.

Also, don't reject explanations.  That's not an optimal strategy for learning.  Don't be macho.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#1235

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-11 00:43 +0000
Message-ID<4e939121$0$19131$9a566e8b@news.aliant.net>
In reply to#1231
On 2011-10-10, Lew <lewbloch@gmail.com> wrote:
> Use the Javadocs, of course.  That's what they're for.  Any time you have to look up a method or type in the API, use the Javadocs as your first recourse.
><http://download.oracle.com/javase/7/docs/api/java/lang/Class.html#forName(java.lang.String)>
>
> Whoever wrote the "sample" you found online must have their head screwed on wrong.  That's the trouble when you copy-and-paste without understanding what you're taking.  You might, as here, grab some bad code and not even know it.
>
> Also, don't reject explanations.  That's not an optimal strategy for learning.  Don't be macho.
>

Sounds good to me.  I'm thinking that relying on code I find on the
internets (with the exception of Canadian Mind Products) may not be the
best route.  In fact, I think I may just go back through the tutorial
again before I revisit my code.

Thanks


-- 
****************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
****************************************************************

[toc] | [prev] | [next] | [standalone]


#1248

FromRoedy Green <see_website@mindprod.com.invalid>
Date2011-10-12 09:52 -0700
Message-ID<5dhb979a5i76gclvkiqb5dn0cmfshmgqks@4ax.com>
In reply to#1206
On 10 Oct 2011 02:32:47 GMT, Linus Flustillbe
<admin@nacs.dyndns-office.com> wrote, quoted or indirectly quoted
someone who said :

>1.  Create a class that
>    a) creates a connection to an oracle database
>    b) run a simple query to get a result set
>    c) pass the result set back to a calling program.

see sample code at http://mindprod.com/jgloss/jdbc.html
http://mindprod.com/jgloss/sql.html

You have an Oracle database and you are a newbie?  Normally only big
companies have them.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to 
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.

[toc] | [prev] | [next] | [standalone]


#1249

FromLew <lewbloch@gmail.com>
Date2011-10-12 10:28 -0700
Message-ID<31937488.2.1318440481728.JavaMail.geo-discussion-forums@prho12>
In reply to#1248
Roedy Green wrote:
> Linus Flustillbe wrote, quoted or indirectly quoted someone who said :
>>1.  Create a class that
>>    a) creates a connection to an oracle database
>>    b) run a simple query to get a result set
>>    c) pass the result set back to a calling program.
> 
> see sample code at http://mindprod.com/jgloss/jdbc.html
> http://mindprod.com/jgloss/sql.html
> 
> You have an Oracle database and you are a newbie?  Normally only big
> companies have them.

And individual developers.

Given that Oracle makes it available for free and all.

Admittedly it can only handle 11 GB of data in the free version, but that's usually enough to develop an application.

IBM gives away DB2, too, and without database size restrictions.

<http://www.oracle.com/technetwork/database/express-edition/overview/index.html>
<http://www-01.ibm.com/software/data/db2/express/>
<http://www.ibm.com/developerworks/downloads/im/udbexp/>

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#1250

FromLinus Flustillbe <admin@nacs.dyndns-office.com>
Date2011-10-13 01:24 +0000
Message-ID<4e963dcf$0$19563$9a566e8b@news.aliant.net>
In reply to#1249
On 2011-10-12, Lew <lewbloch@gmail.com> wrote:
> Roedy Green wrote:
>> Linus Flustillbe wrote, quoted or indirectly quoted someone who said :
>>>1.  Create a class that
>>>    a) creates a connection to an oracle database
>>>    b) run a simple query to get a result set
>>>    c) pass the result set back to a calling program.
>> 
>> see sample code at http://mindprod.com/jgloss/jdbc.html
>> http://mindprod.com/jgloss/sql.html
>> 
>> You have an Oracle database and you are a newbie?  Normally only big
>> companies have them.
>
> And individual developers.
>
> Given that Oracle makes it available for free and all.
>
> Admittedly it can only handle 11 GB of data in the free version, but that's usually enough to develop an application.
>
> IBM gives away DB2, too, and without database size restrictions.
>
><http://www.oracle.com/technetwork/database/express-edition/overview/index.html>
><http://www-01.ibm.com/software/data/db2/express/>
><http://www.ibm.com/developerworks/downloads/im/udbexp/>
>

I'm not using Oracle XE, it's the full bore version of 11g


Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production


-- 
****************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
****************************************************************

[toc] | [prev] | [next] | [standalone]


#1251

FromLew <lewbloch@gmail.com>
Date2011-10-12 18:55 -0700
Message-ID<30143362.386.1318470918520.JavaMail.geo-discussion-forums@prfp13>
In reply to#1250
Linus Flustillbe wrote:
> Lew wrote:
>> Roedy Green wrote:
>>> You have an Oracle database and you are a newbie?  Normally only big
>>> companies have them.
>>
>> And individual developers.> 
>>
>> Given that Oracle makes it available for free and all.
>>
>> Admittedly it can only handle 11 GB of data in the free version, but that's usually enough to develop an application.
>>
>> IBM gives away DB2, too, and without database size restrictions.
>>
>> <http://www.oracle.com/technetwork/database/express-edition/overview/index.html>
>> <http://www-01.ibm.com/software/data/db2/express/>
>> <http://www.ibm.com/developerworks/downloads/im/udbexp/>
> 
> I'm not using Oracle XE, it's the full bore version of 11g

Congratulations.  We're all very happy for you.

-- 
Lew

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.help


csiph-web