Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views and Oracle problems (VARCHAR2)
Message
 
 
À
21/12/1999 14:32:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00306725
Message ID:
00306951
Vues:
31
This is even better than my After Insert trigger. I do lack experience in how to write triggers in Oracle. I have searched several of the major bookstores here for high powered Oracle developer books with an emphasis on PL/SQL. If you have any recommendations, I would sure appreciate a pointing in the right direction. All of my training has been in the Oracle DBA courses and some SQL. The SQL, I have mostly picked up as I go along.

>You could also populate the column using a 'Before Insert' trigger in Oracle:
>
>CREATE OR REPLACE TRIGGER SOMETABLE_INSERT
> BEFORE INSERT ON SOMETABLE FOR EACH ROW
>
> DECLARE
>
> v_Id Number;
>
>
> BEGIN
>
> If :new.id_column Is Null Then
>
> Select CompanyFNext Into v_Id from dual;
> :new.id_column := v_Id;
> End If;
>End;
>
>To use the trigger mechanism you will have to allow your id column to be nullable so that Oracle wont complain about not having a value when you do the insert.
>
>What you may find is that by altering the underlying data structure the other application that interacts with the database may be 'broken'.
>
>Mark
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform