Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursoradapter with field aliases
Message
De
21/03/2007 07:48:43
 
 
À
21/03/2007 07:41:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01206438
Message ID:
01206440
Vues:
32
This message has been marked as the solution to the initial question of the thread.
Yes, it could. In UpdateFieldList add the "AuthorizationDate" and in UpdateNameList put:
AuthorizationDate Dactauth.date,



>I need a CA for this sql
>can this {Dactauth.date AS AuthorizationDate} be done and how does it affect the updatefieldlist and updatenamelist?
>
>this test prg does not return a cursor, but I can't find any reference to aliases in the VFP doc or in What's new in eight?
>
>
>
>
>o=CREATEOBJECT('cursoradapter')
>o.SelectCmd =;
>'SELECT Dactauth.actauth_id, '+;
>'Dactauth.actsect_id, '+;
>'Dactauth.fund_id, '+;
>'Dactauth.counsel_id, '+;
>'Dactauth.date AS AuthorizationDate, '+;
>'Dactauth.amount AS AuthorizationAmount, '+;
>'Dactauth.allocamt AS AllocationAmount, '+;
>'Dactauth.allocdate AS AllocationDate, '+;
>'Dactauth.closed, '+;
>'Dactauth.comments, '+;
>'Dactauth.insdttm, '+;
>'Dactauth.insuser_id, '+;
>'Dactauth.upddttm, '+;
>'Dactauth.upduser_id, '+;
>'Dfund.fundno, '+;
>'Dfund.fintype_id, '+;
>'Dcounsel.bndconcd, '+;
>'Dact.act, '+;
>'Dactsect.sectname AS sectionname, '+;
>'Dactsect.amount AS sectionamount, '+;
>'Dact.act_id '+;
>' FROM  '+;
>'   kba_data!dact  '+;
>'  INNER JOIN kba_data!dactsect  '+;
>' ON  Dact.act_id = Dactsect.act_id  '+;
>'  INNER JOIN kba_data!dactauth  '+;
>' ON  Dactsect.actsect_id = Dactauth.actsect_id  '+;
>'  INNER JOIN kba_data!dfund  '+;
>' ON  Dfund.fund_id = Dactauth.fund_id  '+;
>'  INNER JOIN kba_data!dcounsel  '+;
>' ON  Dcounsel.counsel_id = Dactauth.counsel_id '
>
>o.UpdatableFieldList =;
>'actauth_id,'+;
>'actsect_id,'+;
>'fund_id,'+;
>'counsel_id,'+;
>'date, '+;
>'amount, '+;
>'allocamt, '+;
>'allocdate,'+;
>'closed,'+;
>'comments,'+;
>'insdttm,'+;
>'insuser_id,'+;
>'upddttm,'+;
>'upduser_id'
>
>
>o.UpdateNameList=;
>'actauth_id Dactauth.actauth_id,'+;
>'actsect_id Dactauth.actsect_id,'+;
>'fund_id Dactauth.fund_id,'+;
>'counsel_id Dactauth.counsel_id,'+;
>'date Dactauth.date ,'+;
>'amount Dactauth.amount ,'+;
>'allocamt Dactauth.allocamt ,'+;
>'allocdate Dactauth.allocdate ,'+;
>'closed Dactauth.closed,'+;
>'comments Dactauth.comments,'+;
>'insdttm Dactauth.insdttm,'+;
>'insuser_id Dactauth.insuser_id,'+;
>'upddttm Dactauth.upddttm,'+;
>'upduser_id Dactauth.upduser_id,'+;
>'fundno Dfund.fundno,'+;
>'fintype_id Dfund.fintype_id,'+;
>'bndconcd Dcounsel.bndconcd,'+;
>'act Dact.act,'+;
>'sectname Dactsect.sectname ,'+;
>'amount Dactsect.amount ,'+;
>'act_id Dact.act_id'
>
>	o.DataSourceType='NATIVE'
>	o.Alias="cc1"
>	o.Tables="dact,dactsect,dactauth,dfund,dcounsel"
>	o.KeyFieldList='ACTAUTH_ID'
>	o.BufferModeOverride=5
>	o.AllowInsert=.t.
>	o.AllowDelete=.t.
>	o.AllowUpdate=.t.
>
>IF o.CursorFill()
>
>BROWSE
>
>ENDIF
>
>
>
>Thanks
>
>
>Peter
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform