Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC Connectivity to Oracle
Message
De
11/08/1997 12:07:35
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00043825
Message ID:
00044002
Vues:
30
Mark,

I figured out what was going wrong and I got my updates to work, but am not satisfied with the solution. The syntax that you shared with me is version 5. I have to admit that for the time being, I am still using version 3b.

My problem was that my key field was an Oracle VARCHAR2(10). Oracle trims all VARCHAR2's to the width of the contents. So, Fox was trying to do a key comparison of a 10 character wide field with an Oracle value that was trimmed to something less than 10 characters. You see, my primary keys are automatically generated from an Oracle sequence starting with the number 1 and then these values are placed into a character field. It appears that unless I pad the key field with some other characters to fill the full 10 characters, I will not be able to use a character type field for my primary key.

If fox would let me do an alltrim on the primary key field in the view designer, this would not be a problem. For now I will just have to change all my key fields from character to numeric.

You may be wondering "why aren't you happy with this solution?". Well, I am tried to create 10 character primary keys because, this project is a rewrite of an older program that used 10 character primary keys. If I go with something else, transporting old data to the new database will be much more difficult.

I really appreciated your reply. Your's was the only one that I received.

Jarod

>The following is from the VFP help on TableUpdate. If you are editing multiple rows before issuing the TableUpdate() command, then only the current record may be getting updated in Oracle.
>
>
>TABLEUPDATE([nRows [, lForce]] [, cTableAlias | nWorkArea]
>[, cErrorArray])
>
>nRows Specifies which changes made to the table or cursor are committed.If nRows is 0 and row or table buffering is enabled, only changes made to the current record in the table or cursor are committed.
>
> If nRows is 1 and table buffering is enabled, changes made to all records are committed to the table or cursor. If nRows is 1 and row buffering is enabled, only changes made to the current record in the table or cursor are committed.
>
>If nRows is 2 and table buffering is enabled, changes made to all records are committed to the table or cursor. If nRows is 2 and row buffering is enabled, only changes made to the current record in the table or cursor are committed.
>
>Unlike the 0 and 1 values for nRow, an error doesn’t occur when a change can not be committed, and Visual FoxPro continues to process any remaining records in the table or cursor. If cErrorArray is included, an array containing error information is created when an error occurs.
>
>The default value for nRows is 0.

>>Just a bit more information to my last cry for help. It seems that I am able to add new records to my oracle tables through remote views, but when I try to modify existing records it doesn't work.
>>
>>If I issue a tableupdate(.t.) in the command window while looking at the remote view in a brow window, the result is that the delete mark activates for every record that I modified. Then when I issue a requery(), the delete mark deactivates and all of my changes revert.
>>
>>I'm really confused because tableupdate is returning .T. and it is working fine for new records.
>>
>>What is so differrent about adding new records from modifying existing ones?
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform