=?koi8-r?Q?Re:_My_grid=81s_rightclick_event_is_lost?= by Leonid
Leonid
Fri Feb 06 01:48:40 CST 2004
Hi, Christina
I don't know much about VFP8 because still stay with VFP6. And personaly =
I never used views based on another views, so my suggestion was more =
theoretical then practical. The same error may arise when you change =
structure of the table the view is based on. In some cases you even =
can't open view in view designer to modify it. As for Rushmore, I =
beleive it is not used on fields taken from view vwRelIntr because =
vwRelIntr is not indexed, but it will be better if you investigete it =
using sys(3054).
Leonid
"Ch Lofberg" <ch.lofberg@telia.com> wrote in message =
news:JXAUb.48059$mU6.185174@newsb.telia.net...
> Leonid, your suggestion solved the problem!
>=20
> Yes, vwRelIntr is a local view. This is a new behavior in VFP8 that =
isn?t
> documented as far as I can see. Requery('VwRelsComp') has worked fine =
in
> VFP7 without the changes below.
>=20
> Do you know if PADR and TRIM inside the select-statement are fully
> compatible with Rushmore?
>=20
> The viewdefinition for vwRelsComp is now:
>=20
> CREATE SQL VIEW VwRelsComp AS ;
> Select relname,PADR(company,62) as
> intrname,Created,Owner_id,RelObj,relnotes,keyuniqe,c1to234,space(9) as
> ct1_ct234,;
> keytorel,UsrId,OrigRelOwner,KeyToRelIntr,Reluniq_r,tblAccomps.AccUniq =
as
> AccUniqComp,space(9) as AccUniqCont,CreaUniqe, ;
> intr1arch + 0000000000 as
> intr1arch,AddedBy,PrivIntr,intrid1,intrtype,privRel,RelOwnSign ;
> FROM pu!vwRelIntr ;
> JOIN tblComp1 ON UPPER(vwRelIntr.Relobj) =3D UPPER(tblComp1.c1to234) ;
> JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) =3D =
UPPER(tblComp1.c1to234) ;
> WHERE ;
> &pcvwRelsFilter1 ;
> Group by keytorelintr ;
> UNION ALL ;
> Select relname,PADR((TRIM(AfterName)+ ',' + SPACE(1) +
> PADR(ForeName,30)),62) as intrname,Created,Owner_id,RelObj,relnotes, ;
> keyuniqe,space(9) as
> c1to234,ct1_ct234,keytorel,UsrId,OrigRelOwner,KeyToRelIntr,Reluniq_r, =
;
> space(9) as AccUniqComp,tblAcconts.AccUniq as AccUniqCont,CreaUniqe,
> intr1arch+0000000000 as intr1arch, AddedBy, ;
> PrivIntr, intrid1, intrtype, privRel, RelOwnSign ;
> FROM pu!vwRelIntr ;
> JOIN tblCont1 ON UPPER(vwRelIntr.Relobj) =3D UPPER(tblCont1.ct1_ct234) =
;
> JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) =3D =
UPPER(tblCont1.Ct1_ct234)
> ;
> WHERE ;
> &pcvwRelsFilter2 ;
> Group by keytorelintr ;
> ORDER BY 1
>=20
> Once again - thank you Leonid!
>=20
> Regards
> Christina
>=20
> "Leonid" <leonid@REMOVE_CAPS_AND_INVALIDgrada.lv.invalid> skrev i
> meddelandet news:efbPbnv6DHA.4060@tk2msftngp13.phx.gbl...
> You have an error because your view VwRelsComp is based on another =
view
> pu!vwRelIntr (I beleive it is a view). When you requery VwRelsComp
> pu!vwRelIntr is also requeried and if it returns a cursor with =
slightly
> different structure (say f1 N(3,0) instead of f1 N(2,0)) you will =
receive an
> error "the viewdefinition has been changed". So you must ensure =
pu!vwRelIntr
> always returns cursor with the same structure. Use
>=20
> select MyNumber+000000000.00 as MyNumber ...
>=20
> instead of
>=20
> select MyNumber ...
>=20
> and
>=20
> select Padr(MyString,20) as MyString ...
>=20
> instead of
>=20
> select alltrim(MyString) as MyString ...
>=20
> Then two rows of code that David posted will be enough and it will be =
faster
>=20
> Leonid
>=20
>=20
>=20
> "Ch L=F6fberg" <ch.lofberg@telia.com> wrote in message
> news:ViVTb.47704$mU6.183207@newsb.telia.net...
> > Thank your for your interest David!
> >
> > The view is local at the moment. But it will be transformed to =
remote
> later.
> >
> > Below, the viewdefinition:
> > CREATE SQL VIEW VwRelsComp AS ;
> > Select relname,company as
> > intrname,Created,Owner_id,RelObj,relnotes,keyuniqe,c1to234,space(9) =
as
> > ct1_ct234,;
> > =
keytorel,UsrId,OrigRelOwner,KeyToRelIntr,Reluniq_r,tblAccomps.AccUniq as
> > AccUniqComp,space(9) as AccUniqCont,CreaUniqe, ;
> > intr1arch,AddedBy, PrivIntr, intrid1, intrtype, privRel, RelOwnSign =
;
> > FROM pu!vwRelIntr ;
> > JOIN tblComp1 ON UPPER(vwRelIntr.Relobj) =3D UPPER(tblComp1.c1to234) =
;
> > JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) =3D =
UPPER(tblComp1.c1to234) ;
> > WHERE ;
> > &pcvwRelsFilter1 ;
> > Group by keytorelintr ; && I have of course tried to remove this row =
but
> no
> > difference
> > UNION ALL ;
> > Select relname,ALLTRIM(AfterName) + ', ' + ForeName as
> > intrname,Created,Owner_id,RelObj,relnotes,;
> > keyuniqe,space(9) as
> > =
c1to234,ct1_ct234,keytorel,UsrId,OrigRelOwner,KeyToRelIntr,Reluniq_r, ;
> > space(9) as AccUniqComp,tblAcconts.AccUniq as AccUniqCont,CreaUniqe,
> > intr1arch, AddedBy, ;
> > PrivIntr, intrid1, intrtype, privRel, RelOwnSign ;
> > FROM pu!vwRelIntr ;
> > JOIN tblCont1 ON UPPER(vwRelIntr.Relobj) =3D =
UPPER(tblCont1.ct1_ct234) ;
> > JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) =3D
> UPPER(tblCont1.Ct1_ct234)
> > ;
> > WHERE ;
> > &pcvwRelsFilter2 ;
> > Group by keytorelintr ; && I have of course tried to remove this row =
but
> no
> > difference
> > ORDER BY 1
> >
> > Best regards
> > Christina
> >
> >
> >
> > "David Frankenbach" <sendnospam@sendnospam.net> skrev i meddelandet
> > news:ONHzJwm6DHA.2748@TK2MSFTNGP09.phx.gbl...
> > > Christina,
> > >
> > > Is this a local or remote view? Can you post the view code from =
the
> > > designer?
> > >
> > >
> > > "Ch L=F6fberg" <ch.lofberg@telia.com> wrote in message
> > > news:emLTb.47621$mU6.182795@newsb.telia.net...
> > >
> > > > Yes you are right - David=B4s two coderows should be enough and =
they
> were
> > in
> > > > VFP7. But after moving to VFP8 it complains "the viewdefinition =
has
> been
> > > > changed" when the requery fires and VFP8=B4s help tells me to to =
close
> and
> > > > reopen the view! And after doing so it works again but the =
rightclick
> > > event
> > > > has disappeard.
> > > >
> > > > Trey, I will of course try your sugestion setting the =
recordsource =3D
> ""
> > > > before closing. Thank you!
> > > >
> > > > Any help on the initial problem (VFP8=B4s divergent behavior )
> > > > would be even better than to solve the lost rightclick problem.
> > >
> > >
> >
> >
>=20
>=20