DBD::Oracle and $sth->{PRECISION}
Hi, In perl 5.8.3, DBD::Oracle 1.14, DBI 1.47 I get expected values when I look at $sth->{PRECISION} to retrieve the lengths of varchar2 columns for a given table. I'm now testing perl 5.8.7, DBD::Oracle 1.16, and DBI 1.48 and with the same table the values in $sth->{PRECISION} for varchar2's are all quadruple what they are above. Can anyone shed any light on what might cause this? It seems to affect all tables.
Re: bind_param_inout + DBD::ODBC
DBD::DB2 (http://search.cpan.org/dist/DBD-DB2/DB2.pod) supports bind_param_inout, but it would require you to use the DB2 Connect Personal Edition or DB2 Connect Unlimited for iSeries to access iSeries from your Linux, UNIX, or Windows box. Dan On 10/12/05, Stephen More <[EMAIL PROTECTED]> wrote: > I am currently having a problem calling a stored procedure on an iSeries. > DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access ODBC > Driver]Error in assignment. (SQL-22018)(DBD: st_execute/SQLExecute err=-1) > > > In looking through the perldoc doc for DBI I found: > > "bind_param_inout" > It is expected that few drivers will support this method. The only driver > currently known to do so is > DBD::Oracle (DBD::ODBC may support it in a future release). Therefore it > should not be used for database > independent applications. > > Does DBD::ODBC support bind_param_inout ?? > If not, how can you call a stored procedure from perl using ODBC ? > > -Thanks > Steve More > >
Re: Dbi, Oracle, CursorName
On 10/11/05, Charles Jardine <[EMAIL PROTECTED]> wrote: > > Nardin, Simon wrote, on 11/10/2005 09:05: > > I'm using perl to access Oracle database. Everything is going well, but > > now I have a question about using CursorName. I was searching on the net > > for examples without success how to use cursors with "FOR UPDATE" and > > "CURRENT OF" construct. Is this possible with Oracle using CursorName? > > Maybe do you have an example? Is there an example how to select record > > and immediatelly after that updating it? > > FOR UPDATE part of the SQL language. You can use it from perl > just as you would from SQL*Plus or PL/SQL. > > WHERE CURRENT OF is _not_ part of the SQL language. It is part > of PL/SQL, and, I believe, the Oracle pre-compiler products. Well, that might be how Oracle implements it, but it is actually part of Standard SQL - all versions from 1986 to 2003. SQL 2003 has the rules: 14.10 Update a row of a table. ::= UPDATE SET WHERE CURRENT OF 14.11 Update rows of a table. ::= UPDATE SET [ WHERE ] You can't use WHERE CURRENT OF from perl. You can with DBD::Informix. If you have problems, it is likely related to the name of the cursor for which you specify 'WHERE CURRENT OF'. There's a metadata method to get the cursor name - $sth->{CursorName} or thereabouts. However, not all drivers can support it. However, you can get exactly the same effect by using the > pseudo-column 'rowid'. This column described in the SQL Reference > Manual. > > There is a PL/SQL example of using rowid instead of WHERE CURRENT > OF in the PL/SQL manual. Look for "Fetching Across Commits" in > the index. > > -- > Charles Jardine - Computing Service, University of Cambridge > > -- Jonathan Leffler <[EMAIL PROTECTED]> #include Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org "I don't suffer from insanity - I enjoy every minute of it."
bind_param_inout + DBD::ODBC
I am currently having a problem calling a stored procedure on an iSeries. DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access ODBC Driver]Error in assignment. (SQL-22018)(DBD: st_execute/SQLExecute err=-1) In looking through the perldoc doc for DBI I found: "bind_param_inout" It is expected that few drivers will support this method. The only driver currently known to do so is DBD::Oracle (DBD::ODBC may support it in a future release). Therefore it should not be used for database independent applications. Does DBD::ODBC support bind_param_inout ?? If not, how can you call a stored procedure from perl using ODBC ? -Thanks Steve More