Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter left join , CursorSchema trouble !
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00804222
Message ID:
00804319
Vues:
43
(Nolock) is for keeping sql from locking table
My CA use sql table, I've suppose that my select must be a sql select
Is it true.

I have change my SelectCmd for this
Select Dp.*,St.STCODE From A_Dependants As Dp Left join A_Statut As St On(St.Id_Statut = Dp.DeStatus)

and my cursorschema for this
ID_DEPENDANTS I,ID_MEMBRES I,DENOM C(20),DEPRENOM C(20),DENATURE N(3,0),DEDATENAISSANCE D,DATEDEBUT D,DATEFIN D,DEREMARQUE M,DESTATUS I,DESEXE N(3,0),STCODE C(6)

As the first time if lusecursorschema = .f. it'work but if it = .T.
it dosent.
Aerror() Return this
(1,1) 2005
(1,2) "00000001" Incorrect function
(1,3) "00000001" Incorrect function



>If you run that SELECT command from the Command Window, does it work? Also, after you get the error, try running AERROR(laError) from the Command Window to see if you get an error information returned. BTW, what does (nolock) mean?
>
>>Hi Mark
>>
>>I trid this but nothing change
>>
>>SelectCmd :
>>SELECT DP.*,ST.ID_STATUT,ST.STCODE,ST.STDESCRIPTION,ST.STPAYE from A_Dependants as DP (Nolock) left join A_statut as ST (nolock) on (st.Id_statut = dp.destatus)
>>
>>CursorSchema
>>ID_DEPENDANTS I,ID_MEMBRES I,DENOM C(20),DEPRENOM C(20),DENATURE N(3,0),DEDATENAISSANCE D,DATEDEBUT D,DATEFIN D,DEREMARQUE M,DESTATUS I,DESEXE N(3,0),ID_STATUT I,STCODE C(6),STDESCRIPTION C(30),STPAYE L
>>
>>
>>
>>>Your CursorSchema needs to include all the fields that are being SELECTED from both tables. You are selecting ST.* from the A_Statut table. Since this is probably not the only field in that table, you either have to add all the other fields to the CursorSchema or modify you SelectCmd to SELECT DP.*, ST.StCode FROM...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform