This is a multi-part message in MIME format.

------extPart_000_010E_01C2D42F.65684980
Content-Type: text/plain;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi, 
   As it turns out, my problems run much deeper than this. I simplified the problem a little too much, and goofed because of it. I'm very sorry to have wasted your time.

Marty.

  ----- Original Message ----- 
  From: Martin Bonner 
  To: ruby-talk ML 
  Sent: Friday, February 14, 2003 1:11 PM
  Subject: DBI, oracle, and prepare


  Hi, 
     First, I'd like to thank you all for the help you've provided me in the past, despite this being my first post here. 

  Now, my problem. I'm having some trouble with basic DBI functionality. In its simplist form, my script:
  #!c:\ruby\bin\ruby.exe -w
  require 'DBI'

  begin
  dbh=DBI.connect("dbi:Oracle:db","user","password")
  sth=dbh.prepare("insert into test_and_drop (id, descript) values (?,?)")
  dbh.execute("1","Because")
  rescue DBI::DatabaseError => e
     puts "An error occurred"
     print "Error Code: ", e.err, "\n"
     print "Error Message: ", e.errstr, "\n"
  ensure
     dbh.disconnect if dbh
  end 

  This is almost directly out of "Using the DBI Module" by Paul DuBios*, so I would think that it would work, but, on the prepare, I'm getting:

  C:/ruby/lib/ruby/site_ruby/1.6/DBD/Oracle/Oracle.rb:34: warning: discarding old to_i
  An error occurred
  Error Code: 1003
  Error Message: ORA-01003: no statement parsed
   
  I'm running ruby 1.6.7 on Win2K, connecting to an Oracle 8i db. Anybody know what might be happening here? My hair is getting thinner by the minute...  :)

  Thank you,
  Marty

  *Credit where credit is due..
------extPart_000_010E_01C2D42F.65684980
Content-Type: text/html;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4916.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c0c0c0>
<DIV><FONT face="Courier New" size=2>Hi, </FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; As it turns out, my problems 
run much deeper than this. I simplified the problem a little too much, and 
goofed because of it. I'm very sorry to have wasted your time.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>Marty.</FONT><BR></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=marty / darkora.net href="mailto:marty / darkora.net">Martin Bonner</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=ruby-talk / ruby-lang.org 
  href="mailto:ruby-talk / ruby-lang.org">ruby-talk ML</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, February 14, 2003 1:11 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> DBI, oracle, and prepare</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face="Courier New" size=2>Hi, </FONT></DIV>
  <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; First, I'd like to thank you 
  all for the help you've provided me in the past, despite this being my first 
  post here. </FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>Now, my problem. I'm having some trouble 
  with basic DBI functionality. In its simplist form, my script:</FONT></DIV>
  <DIV><FONT face="Courier New" size=2>#!c:\ruby\bin\ruby.exe -w<BR>require 
  'DBI'</FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" 
  size=2>begin<BR>dbh=DBI.connect("dbi:Oracle:db","user","password")<BR>sth=dbh.prepare("insert 
  into test_and_drop (id, descript) values 
  (?,?)")<BR>dbh.execute("1","Because")<BR>rescue DBI::DatabaseError =&gt; 
  e<BR>&nbsp;&nbsp; puts "An error occurred"<BR>&nbsp;&nbsp; print "Error Code: 
  ", e.err, "\n"<BR>&nbsp;&nbsp; print "Error Message: ", e.errstr, 
  "\n"<BR>ensure<BR>&nbsp;&nbsp; dbh.disconnect if dbh<BR>end </FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>This is almost directly out of "Using the 
  DBI Module" by Paul DuBios*, so I would think that it would work, but, on the 
  prepare,&nbsp;I'm getting:</FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" 
  size=2>C:/ruby/lib/ruby/site_ruby/1.6/DBD/Oracle/Oracle.rb:34: warning: 
  discarding old to_i<BR>An error occurred<BR>Error Code: 1003<BR>Error Message: 
  ORA-01003: no statement parsed<BR></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>I'm running ruby 1.6.7 on Win2K, 
  connecting to an Oracle 8i db. Anybody know what might be happening here? My 
  hair is getting thinner by the minute...&nbsp; :)</FONT></DIV>
  <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face="Courier New" size=2>Thank you,</FONT></DIV>
  <DIV><FONT face="Courier New" size=2>Marty<BR></FONT></DIV>
  <DIV><FONT face="Courier New" size=2>*Credit where credit is 
due..</DIV></BLOCKQUOTE></FONT></BODY></HTML>

------extPart_000_010E_01C2D42F.65684980--