Oracle Accelerator vs Oracle Sequences 
Author Message
 Oracle Accelerator vs Oracle Sequences

Hi,

    My question is the following.  I use Clarion 5.0 with Oracle
Accelerator.  I use Legacy templates.  What is the right coding I must
use access an Oracle Sequence properly?  

Here is the coding I used:      

    The TPS file format which will receive sequence:

     S_CODE_BARRE
FILE,DRIVER('TOPSPEED'),NAME('\WAPP\PRODUCTI\CBAR_SEQ.TPS'),PRE(CSQ),CREATE,BINDABLE,THREAD        
Record                   RECORD,PRE()
          SequenceNo                  LONG
        END
     END
     S_CODE_BARRE::Used   LONG,THREAD

    The application coding:

     LOOP
       OPEN(S_CODE_BARRE)  
       S_CODE_BARRE{PROP:SQL} = 'Select S_CODE_BARRE.NextVal from dual'
       NEXT(S_CODE_BARRE)
       IF ERROR()
         IF CONFIRM_ITM('S_CODE_BARRE ' & ERROR(),'Voulez-vous essayer
nouveau?')
           CLOSE(S_CODE_BARRE)
           CYCLE
         ELSE
           CLOSE(S_CODE_BARRE)
           GOTO FIN_ENREG
         END
       ELSE
         BREAK
       END
     END

     CLOSE(S_CODE_BARRE)

   I first checked the SQL statement whitin Oracle SQL Plus 3.2 and it
worked perfectly.  But on Clarion Side,
the "BARCODE" variable is always returning me "00000000"...

  My question is important because my application and another
application written in Progress must share the same sequence.  This
explain why I have to leave Clarion Autoinc solution to Oracle Sequence
solution...

Any idea?

THanks in advance,

Stphane



Tue, 12 Aug 2003 13:20:52 GMT  
 Oracle Accelerator vs Oracle Sequences
Hi Stephane!

I am not sure that you can apply prop:SQL to a topspeed file.


Quote:
> Hi,

>     My question is the following.  I use Clarion 5.0 with Oracle
> Accelerator.  I use Legacy templates.  What is the right coding I must
> use access an Oracle Sequence properly?

> Here is the coding I used:

>     The TPS file format which will receive sequence:

>      S_CODE_BARRE

FILE,DRIVER('TOPSPEED'),NAME('\WAPP\PRODUCTI\CBAR_SEQ.TPS'),PRE(CSQ),CREATE,
BINDABLE,THREAD
Quote:
> Record                   RECORD,PRE()
>           SequenceNo                  LONG
>         END
>      END
>      S_CODE_BARRE::Used   LONG,THREAD

>     The application coding:

>      LOOP
>        OPEN(S_CODE_BARRE)
>        S_CODE_BARRE{PROP:SQL} = 'Select S_CODE_BARRE.NextVal from dual'
>        NEXT(S_CODE_BARRE)
>        IF ERROR()
>          IF CONFIRM_ITM('S_CODE_BARRE ' & ERROR(),'Voulez-vous essayer
> nouveau?')
>            CLOSE(S_CODE_BARRE)
>            CYCLE
>          ELSE
>            CLOSE(S_CODE_BARRE)
>            GOTO FIN_ENREG
>          END
>        ELSE
>          BREAK
>        END
>      END

>      CLOSE(S_CODE_BARRE)

>    I first checked the SQL statement whitin Oracle SQL Plus 3.2 and it
> worked perfectly.  But on Clarion Side,
> the "BARCODE" variable is always returning me "00000000"...

>   My question is important because my application and another
> application written in Progress must share the same sequence.  This
> explain why I have to leave Clarion Autoinc solution to Oracle Sequence
> solution...

> Any idea?

> THanks in advance,

> Stphane



Tue, 12 Aug 2003 21:33:46 GMT  
 Oracle Accelerator vs Oracle Sequences
Hi Pierre,

  I think you put me on a track!  I changed the TPS file for an Oracle
file i.e. DUAL which I imported from Oracle and then changed the type of
field "DUMMY" to REAL because original type issued from import couldn't
allow me to receive sequence value.

  I think that the Oracle Accelerator book should be revised to correct
this issue.  Someone could scratch his head to {*filter*} to find what's not
working with this example...;)

Thanks for your time,

Stphane

Quote:

> Hi Stephane!

> I am not sure that you can apply prop:SQL to a topspeed file.



> > Hi,

> >     My question is the following.  I use Clarion 5.0 with Oracle
> > Accelerator.  I use Legacy templates.  What is the right coding I must
> > use access an Oracle Sequence properly?

> > Here is the coding I used:

> >     The TPS file format which will receive sequence:

> >      S_CODE_BARRE

> FILE,DRIVER('TOPSPEED'),NAME('\WAPP\PRODUCTI\CBAR_SEQ.TPS'),PRE(CSQ),CREATE,
> BINDABLE,THREAD
> > Record                   RECORD,PRE()
> >           SequenceNo                  LONG
> >         END
> >      END
> >      S_CODE_BARRE::Used   LONG,THREAD

> >     The application coding:

> >      LOOP
> >        OPEN(S_CODE_BARRE)
> >        S_CODE_BARRE{PROP:SQL} = 'Select S_CODE_BARRE.NextVal from dual'
> >        NEXT(S_CODE_BARRE)
> >        IF ERROR()
> >          IF CONFIRM_ITM('S_CODE_BARRE ' & ERROR(),'Voulez-vous essayer
> > nouveau?')
> >            CLOSE(S_CODE_BARRE)
> >            CYCLE
> >          ELSE
> >            CLOSE(S_CODE_BARRE)
> >            GOTO FIN_ENREG
> >          END
> >        ELSE
> >          BREAK
> >        END
> >      END

> >      CLOSE(S_CODE_BARRE)

> >    I first checked the SQL statement whitin Oracle SQL Plus 3.2 and it
> > worked perfectly.  But on Clarion Side,
> > the "BARCODE" variable is always returning me "00000000"...

> >   My question is important because my application and another
> > application written in Progress must share the same sequence.  This
> > explain why I have to leave Clarion Autoinc solution to Oracle Sequence
> > solution...

> > Any idea?

> > THanks in advance,

> > Stphane



Fri, 15 Aug 2003 10:25:30 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. USING ORACLE ACCELERATOR WITH ORACLE 8

2. Oracle accelerator and 16 bits vs 32 -- newby

3. Oracle Accelerator

4. Oracle accelerator

5. Oracle Accelerator

6. Oracle Accelerator for C4C Candidate Release 1 Now Available

7. Oracle Accelerator - HELP!

8. Using Oracle Accelerator 4b

9. Oracle Accelerator

10. Oracle Accelerator: Problem with RIDELETE()

11. Problems using transactions with Oracle Accelerator

12. Is Oracle Accelerator free now (C55 G) ?

 

 
Powered by phpBB® Forum Software