Author: byterock
Date: Mon Mar 17 17:57:23 2008
New Revision: 10933

Modified:
   dbd-oracle/branches/scroll/Oracle.pm
   dbd-oracle/branches/scroll/Oracle.xs
   dbd-oracle/branches/scroll/oci8.c

Log:
changed the name of my function to ora_scroll_position to make it a little more 
palatable and it all seems to working returning the current position.  Next 
Test and Pod and patch is done

Modified: dbd-oracle/branches/scroll/Oracle.pm
==============================================================================
--- dbd-oracle/branches/scroll/Oracle.pm        (original)
+++ dbd-oracle/branches/scroll/Oracle.pm        Mon Mar 17 17:57:23 2008
@@ -72,7 +72,7 @@
         DBD::Oracle::db->install_method("ora_nls_parameters");
         DBD::Oracle::db->install_method("ora_can_unicode");
        DBD::Oracle::st->install_method("ora_fetch_scroll");
-       DBD::Oracle::st->install_method("ora_scroll_current_position");
+       DBD::Oracle::st->install_method("ora_scroll_position");
        
        $drh;
     }

Modified: dbd-oracle/branches/scroll/Oracle.xs
==============================================================================
--- dbd-oracle/branches/scroll/Oracle.xs        (original)
+++ dbd-oracle/branches/scroll/Oracle.xs        Mon Mar 17 17:57:23 2008
@@ -97,14 +97,12 @@
 
 
 void
-ora_scroll_current_position(sth)
+ora_scroll_position(sth)
     SV *       sth
     PREINIT:
     D_imp_sth(sth);
-    sword status;
-    CODE:
+   CODE:
     {
-    PerlIO_printf(DBILOGFP, " fetch_position=%d\n",imp_sth->fetch_position);
        XSRETURN_IV( imp_sth->fetch_position);
 }
 

Modified: dbd-oracle/branches/scroll/oci8.c
==============================================================================
--- dbd-oracle/branches/scroll/oci8.c   (original)
+++ dbd-oracle/branches/scroll/oci8.c   Mon Mar 17 17:57:23 2008
@@ -2379,14 +2379,11 @@
                PerlIO_printf(DBILOGFP, "    dbd_st_fetch %d fields...\n", 
DBIc_NUM_FIELDS(imp_sth));
            }
         if (imp_sth->fetch_orient) {
-                       int cp;
-               ub4 sz = sizeof(cp) ;
-               if (imp_sth->exe_mode!=OCI_STMT_SCROLLABLE_READONLY)
+                       if (imp_sth->exe_mode!=OCI_STMT_SCROLLABLE_READONLY)
                                    croak ("attempt to use a scrollable cursor 
without first setting ora_exe_mode to OCI_STMT_SCROLLABLE_READONLY\n") ;
 
                        OCIStmtFetch_log_stat(imp_sth->stmhp, imp_sth->errhp,1, 
imp_sth->fetch_orient,imp_sth->fetch_offset, status);
-                       OCIAttrGet_stmhp_stat(imp_sth, &cp, &sz, 
OCI_ATTR_CURRENT_POSITION, status);
-               PerlIO_printf(DBILOGFP, "    OCI_ATTR_CURRENT_POSITION= %d 
...\n", cp);
+                       OCIAttrGet_stmhp_stat(imp_sth, 
&imp_sth->fetch_position, 0, OCI_ATTR_CURRENT_POSITION, status);
 
                } else {
                        OCIStmtFetch_log_stat(imp_sth->stmhp, imp_sth->errhp,1, 
(ub2)OCI_FETCH_NEXT, 0, status);

Reply via email to