Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trimming Values from Fox to Oracle
Message
 
À
18/10/2001 12:34:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00570333
Message ID:
00572646
Vues:
32
>Hello All,
>
>Here is my problem. I have an updatable remote view which I created through SPT and CURSORSETPROP. When I change a value in the view and then issue a TABLEUPDATE the value that is placed in the Oracle Table is not trimmed. Infact it has the full number of spaces for the field. The Oracle field type is VARCHAR2 so I know I should be able to trim the values. How can I make the values trim when using a cursor?
>
>Matt
I have played with the same problem for a couple of years and have used three different solutions. (1) I created different views of the same Oracle table and used the properties on the view designer to make the width of the field match the length of the data I was updating. Then I selected the view to use based on the data length. This worked OK since all of the data was either 11,12 or 13 characters in width and I had only one character field to update.(2) I wrote a program that used one view of the Oracle data. I got all the different lengths of the data and for each length I would close the database , open the .DBC as a table, modify the property field of the .DBC for the field I was updating to match the length of the data, close the .DBC , reopen the database and do the update. (3) I created an Oracle table with the same structure as the one I wanted to update. I updated this Oracle table with VFP - pads and all. I put triggers on the table with the padded values that did the actual updating to the final table with trimmed values.
All three worked but it seems like there should be a better way. One of the reasons I signed up for the VFP-Oracle session this Sunday at the GLGDW was to try and find the "better way".
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform