On Fri, Jun 01, 2007 at 08:44:36PM +0900, Peter Bailey wrote:
> I put in what you suggested above and, it does seem to be actually 
> talking to the database, and, it's respecting my script's error 
> presentations.
> 
> require 'oci8'
> require 'dbi'
>    begin
>      # connect to the Oracle server
>      #dbh = 
> OCI8.new('oracleuser','oracle2user','//graphicsdb-prod.bna.com/grpprod.bna.com"')
> 
>      #dbh = 
> DBI.connect("DBI:OCI8:ORCL:graphicsdb-prod.bna.com/grpprod.bna.com", 
> "orcauser", "orca2user")
>      dbh = DBI.connect("DBI:OCI8:grpprod","orcauser","orca2user")
> 
>      # get server version string and display it
>      row = dbh.select_one("SELECT VERSION()")
>      puts "Server version: " + row[0]
>    rescue DBI::DatabaseError => e
>      puts "An error occurred"
>      puts "Error code: #{e.err}"
>      puts "Error message: #{e.errstr}"
>    ensure
>      # disconnect from server
>      dbh.disconnect if dbh
>    end
> 
> With the above, I get:
> 
> An error occurred
> Error code: 923
> Error message: ORA-00923: FROM keyword not found where expected
> 
> Program exited with code 0
> 
> which is exactly what the script said to do, to report the exact errors, 
> number and all.

Your login has been successful. Now you just need to learn Oracle SQL :-)

There's good documentation online at
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm

As the error says, you are missing the FROM keyword. Try the following:

   SELECT 1+1 FROM DUAL

as a very heavyweight desk calculator. Also, a quick Google suggests that

   SELECT * FROM v$version

will report the Oracle software component versions.

Good luck,

Brian.