[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: DBI Oracle error

Berger, Daniel

6/10/2005 2:08:00 PM

> -----Original Message-----
> From: Graham [mailto:gandalfmeister@gmail.com]
> Sent: Friday, June 10, 2005 5:55 AM
> To: ruby-talk ML
> Subject: Re: DBI Oracle error
>
>
> My first attempt at debugging adopts your idea, so for the
> parameterised insert of: sth = dbh.prepare("INSERT INTO
> EFFLUENT_LOG (datetime, suspect, flow, temp, ph)
> VALUES(to_date(?, 'DD/MM/YY HH24:MI:SS'), ?, ?, ?, ?)");
>
> I now run on a row by row basis:-
> sth.execute((date + " " + time), val,
> sprintf("%3.1f",flow.to_f).to_f, sprintf("%4.2f",
> temp.to_f).to_f, sprintf("%5.2f",ph.to_f).to_f) whic smacks
> of paranoia in my book. However still get exactly the same
> failures. (BTW The suspect field is a single character 'Y' or 'N' )
>
> I'm beginning to think DBI for Oracle is extremely buggy.
>
> Any suggestions for an alternative interface to Oracle, or
> ideas what the problem might be? Regards Graham

There are three Oracle drivers: oracle, OCI8 and Ruby9i. I use OCI8
myself. Try one of the others and see how it goes.

Regards,

Dan


2 Answers

Graham

6/10/2005 9:51:00 PM

0

Will do - thanks. I didn't realise I had installed such an old driver.
First inspection appears that I don't have the knowledge to build the
Ruby9i driver - as it comes as a build package for Linux I assume. OCI8
liiks more promising (read - idiot proof)
I'll try it on Monday
Regards
Graham

Graham

6/14/2005 8:02:00 AM

0

If anyone else is interested, replacing the Oracle driver with the OCI8
driver solved my problem. It looks like the standard Oracle driver is
buggy under DBI at least.
Graham