Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle varchar in remote view
Message
De
24/09/2004 17:14:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00945603
Message ID:
00945901
Vues:
21
Am I correct in thinking that I should be able to do everything that I currently do with remote views in cursoradapters?

Jason


>>Hi Mark, I tried the CABuilder class and it is pretty slick. One problem though, when I try inserting a record (ie insert into genkey (fieldid, lastused) values ('test','1234')) I get an error saying that It is trying to insert null into fieldid. I looked into the CA built by your builder and the fieldid which is the pk is not in the insert or update command. Did I miss something or is there a reason for this?
>
>By default, my builder does NOT include PK fields for inserts and updates. I handle the population of PK fields either with a BeforeInsertUpdate trigger [in Oracle] or in the case of a VFP table, throught the use of the Default value for that PK field. The Default is actually a function call to a stored procedure in the DBC that checks a Kounters table to get the next (integer) ID for that table. I will probably make this a builder option in my next version.
>
>>If I am building a cursor adapter myself do I have to specify the insert, delete and update commands?
>
>No, you can let VFP do this for you as long as properties like Tables, UpdatableFieldList, UpdateNameList and KeyFieldList are properly filled in. The ConversionFunc property is also useful for RTRIMming character fields when the source DB column is a varchar data type. Fortunately, in VFP9 we now have native varchar data types and varchar mapping to remote DB columns. The SendUpdates, AllowInsert, AllowUpdate and AllowDelete properties also need to be .T.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform