Hi all!

I have to close and reopen a view to populate a grid (designed in VFP7) in
VFP8. This probably because of lack of backcompatibility VFP8 to VFP7. I do
this with the code below.

SELECT vwRelscomp
USE
USE vwRelscomp IN 0
SELECT vwRelscomp
Requery('vwRelsComp')
This.Grid1.RecordSource = 'vwRelscomp'
This.Grid1.Column1.Text1.ControlSource = 'vwRelsComp.relname'
This.Grid1.Column1.Width = lnCol1Width && saved before closing the view

Now the grid is populated again even in VFP8 but the Grid1.Column1's
capacity to fire it's rightclick event becomes lost.

How can I get the rightclick event (a shorcutmenu designed i the
menubuilder) back to work?

Regards
Christina

Re: My grid´s rightclick event is lost by Trey

Trey
Mon Feb 02 23:07:45 CST 2004

why do you need to close and reopen the view? i.e., what behavior are you
getting if simply requery the view? i don't know of any compatibility issues
along these lines...[could be, just never seen them]

i believe what's happening is that when you close the view, the grid's
binding the recordsource is lost, therefore the columns are all destroyed.
so when you rebind it, you get all new columns, hence losing your
right-click.

swag: if simply requerying (and not closing/using) the view just isn't
working, you might try explicity setting the recordsource="" before closing
the view. this might keep the columns in existence.

"Ch Löfberg" <ch.lofberg@telia.com> wrote in message
news:BvCTb.81389$dP1.210094@newsc.telia.net...
> Hi all!
>
> I have to close and reopen a view to populate a grid (designed in VFP7) in
> VFP8. This probably because of lack of backcompatibility VFP8 to VFP7. I
do
> this with the code below.
>
> SELECT vwRelscomp
> USE
> USE vwRelscomp IN 0
> SELECT vwRelscomp
> Requery('vwRelsComp')
> This.Grid1.RecordSource = 'vwRelscomp'
> This.Grid1.Column1.Text1.ControlSource = 'vwRelsComp.relname'
> This.Grid1.Column1.Width = lnCol1Width && saved before closing the
view
>
> Now the grid is populated again even in VFP8 but the Grid1.Column1's
> capacity to fire it's rightclick event becomes lost.
>
> How can I get the rightclick event (a shorcutmenu designed i the
> menubuilder) back to work?
>
> Regards
> Christina
>
>
>



Re: My grid´s rightclick event is lost by David

David
Mon Feb 02 23:21:37 CST 2004

Christina,

You should be able to replace all of that code you posted with these two
lines:

Requery( "vwRelsComp" )
this.grid1.Refresh()

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro



"Ch Löfberg" <ch.lofberg@telia.com> wrote in message
news:BvCTb.81389$dP1.210094@newsc.telia.net...
> Hi all!
>
> I have to close and reopen a view to populate a grid (designed in VFP7) in
> VFP8. This probably because of lack of backcompatibility VFP8 to VFP7. I
do
> this with the code below.
>
> SELECT vwRelscomp
> USE
> USE vwRelscomp IN 0
> SELECT vwRelscomp
> Requery('vwRelsComp')
> This.Grid1.RecordSource = 'vwRelscomp'
> This.Grid1.Column1.Text1.ControlSource = 'vwRelsComp.relname'
> This.Grid1.Column1.Width = lnCol1Width && saved before closing the
view
>
> Now the grid is populated again even in VFP8 but the Grid1.Column1's
> capacity to fire it's rightclick event becomes lost.
>
> How can I get the rightclick event (a shorcutmenu designed i the
> menubuilder) back to work?



Re: My grid´s rightclick event is lost by Ch

Ch
Tue Feb 03 05:12:10 CST 2004

Thank you Trey and David for the respons!

Yes you are right - David´s 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´s 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 = ""
before closing. Thank you!

Any help on the initial problem (VFP8´s divergent behavior )
would be even better than to solve the lost rightclick problem.

Best regards
Christina

"David Frankenbach" <sendnospam@sendnospam.net> skrev i meddelandet
news:uJsRaWh6DHA.3896@TK2MSFTNGP11.phx.gbl...
> Christina,
>
> You should be able to replace all of that code you posted with these two
> lines:
>
> Requery( "vwRelsComp" )
> this.grid1.Refresh()
>
> --
> df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
>
>
>
> "Ch Löfberg" <ch.lofberg@telia.com> wrote in message
> news:BvCTb.81389$dP1.210094@newsc.telia.net...
> > Hi all!
> >
> > I have to close and reopen a view to populate a grid (designed in VFP7)
in
> > VFP8. This probably because of lack of backcompatibility VFP8 to VFP7. I
> do
> > this with the code below.
> >
> > SELECT vwRelscomp
> > USE
> > USE vwRelscomp IN 0
> > SELECT vwRelscomp
> > Requery('vwRelsComp')
> > This.Grid1.RecordSource = 'vwRelscomp'
> > This.Grid1.Column1.Text1.ControlSource = 'vwRelsComp.relname'
> > This.Grid1.Column1.Width = lnCol1Width && saved before closing the
> view
> >
> > Now the grid is populated again even in VFP8 but the Grid1.Column1's
> > capacity to fire it's rightclick event becomes lost.
> >
> > How can I get the rightclick event (a shorcutmenu designed i the
> > menubuilder) back to work?
>
>




Re: My grid´s rightclick event is lost by David

David
Tue Feb 03 09:40:21 CST 2004

Christina,

Is this a local or remote view? Can you post the view code from the
designer?


"Ch Löfberg" <ch.lofberg@telia.com> wrote in message
news:emLTb.47621$mU6.182795@newsb.telia.net...

> Yes you are right - David´s 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´s 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 = ""
> before closing. Thank you!
>
> Any help on the initial problem (VFP8´s divergent behavior )
> would be even better than to solve the lost rightclick problem.



Re: My grid´s rightclick event is lost by Ch

Ch
Tue Feb 03 16:20:16 CST 2004

Your suggestion (RecordSource='') Trey was a success. The code below works.

SELECT vwRelscomp
This.Grid1.RecordSource = ''
USE
USE vwRelscomp IN 0 && notdata and/or shared causes requery malfunction next
coderow
requery('vwRelscomp')
SELECT vwRelscomp
This.Grid1.RecordSource = 'vwRelscomp'

What can the reason for impossibility to open (use) the view notdata and/or
shared be?

Regards
Christina

"Trey Walpole" <treypoleNO@SPAMcomcast.net> skrev i meddelandet
news:ejcU2Oh6DHA.2556@TK2MSFTNGP09.phx.gbl...
> why do you need to close and reopen the view? i.e., what behavior are you
> getting if simply requery the view? i don't know of any compatibility
issues
> along these lines...[could be, just never seen them]
>
> i believe what's happening is that when you close the view, the grid's
> binding the recordsource is lost, therefore the columns are all destroyed.
> so when you rebind it, you get all new columns, hence losing your
> right-click.
>
> swag: if simply requerying (and not closing/using) the view just isn't
> working, you might try explicity setting the recordsource="" before
closing
> the view. this might keep the columns in existence.
>
> "Ch Löfberg" <ch.lofberg@telia.com> wrote in message
> news:BvCTb.81389$dP1.210094@newsc.telia.net...
> > Hi all!
> >
> > I have to close and reopen a view to populate a grid (designed in VFP7)
in
> > VFP8. This probably because of lack of backcompatibility VFP8 to VFP7. I
> do
> > this with the code below.
> >
> > SELECT vwRelscomp
> > USE
> > USE vwRelscomp IN 0
> > SELECT vwRelscomp
> > Requery('vwRelsComp')
> > This.Grid1.RecordSource = 'vwRelscomp'
> > This.Grid1.Column1.Text1.ControlSource = 'vwRelsComp.relname'
> > This.Grid1.Column1.Width = lnCol1Width && saved before closing the
> view
> >
> > Now the grid is populated again even in VFP8 but the Grid1.Column1's
> > capacity to fire it's rightclick event becomes lost.
> >
> > How can I get the rightclick event (a shorcutmenu designed i the
> > menubuilder) back to work?
> >
> > Regards
> > Christina
> >
> >
> >
>
>



Re: My grid´s rightclick event is lost by Ch

Ch
Tue Feb 03 16:31:17 CST 2004

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) = UPPER(tblComp1.c1to234) ;
JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) = 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) = UPPER(tblCont1.ct1_ct234) ;
JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) = 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öfberg" <ch.lofberg@telia.com> wrote in message
> news:emLTb.47621$mU6.182795@newsb.telia.net...
>
> > Yes you are right - David´s 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´s 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 = ""
> > before closing. Thank you!
> >
> > Any help on the initial problem (VFP8´s divergent behavior )
> > would be even better than to solve the lost rightclick problem.
>
>



=?koi8-r?Q?Re:_My_grid=81s_rightclick_event_is_lost?= by Leonid

Leonid
Wed Feb 04 02:35:33 CST 2004

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

select MyNumber+000000000.00 as MyNumber ...

instead of

select MyNumber ...

and

select Padr(MyString,20) as MyString ...

instead of

select alltrim(MyString) as MyString ...

Then two rows of code that David posted will be enough and it will be =
faster

Leonid



"Ch L=F6fberg" <ch.lofberg@telia.com> wrote in message =
news:ViVTb.47704$mU6.183207@newsb.telia.net...
> Thank your for your interest David!
>=20
> The view is local at the moment. But it will be transformed to remote =
later.
>=20
> 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
>=20
> Best regards
> Christina
>=20
>=20
>=20
> "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


Re: My grid?s rightclick event is lost by Ch

Ch
Wed Feb 04 17:45:40 CST 2004

Hi Leonid and thank you very much!

Is this a new behavior in VFP8?

I will consider your suggestions, you will hear from me again.

Best regards
Christina

"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

select MyNumber+000000000.00 as MyNumber ...

instead of

select MyNumber ...

and

select Padr(MyString,20) as MyString ...

instead of

select alltrim(MyString) as MyString ...

Then two rows of code that David posted will be enough and it will be faster

Leonid



"Ch Löfberg" <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) = UPPER(tblComp1.c1to234) ;
> JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) = 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) = UPPER(tblCont1.ct1_ct234) ;
> JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) =
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öfberg" <ch.lofberg@telia.com> wrote in message
> > news:emLTb.47621$mU6.182795@newsb.telia.net...
> >
> > > Yes you are right - David´s 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´s 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 =
""
> > > before closing. Thank you!
> > >
> > > Any help on the initial problem (VFP8´s divergent behavior )
> > > would be even better than to solve the lost rightclick problem.
> >
> >
>
>




Re: My grid?s rightclick event is lost by Ch

Ch
Thu Feb 05 18:10:17 CST 2004

Leonid, your suggestion solved the problem!

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.

Do you know if PADR and TRIM inside the select-statement are fully
compatible with Rushmore?

The viewdefinition for vwRelsComp is now:

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) = UPPER(tblComp1.c1to234) ;
JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) = 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) = UPPER(tblCont1.ct1_ct234) ;
JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) = UPPER(tblCont1.Ct1_ct234)
;
WHERE ;
&pcvwRelsFilter2 ;
Group by keytorelintr ;
ORDER BY 1

Once again - thank you Leonid!

Regards
Christina

"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

select MyNumber+000000000.00 as MyNumber ...

instead of

select MyNumber ...

and

select Padr(MyString,20) as MyString ...

instead of

select alltrim(MyString) as MyString ...

Then two rows of code that David posted will be enough and it will be faster

Leonid



"Ch Löfberg" <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) = UPPER(tblComp1.c1to234) ;
> JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) = 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) = UPPER(tblCont1.ct1_ct234) ;
> JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) =
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öfberg" <ch.lofberg@telia.com> wrote in message
> > news:emLTb.47621$mU6.182795@newsb.telia.net...
> >
> > > Yes you are right - David´s 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´s 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 =
""
> > > before closing. Thank you!
> > >
> > > Any help on the initial problem (VFP8´s divergent behavior )
> > > would be even better than to solve the lost rightclick problem.
> >
> >
>
>



=?iso-8859-1?Q?Re:_My_grid=81s_rightclick_event_is_lost?= by Stefan

Stefan
Fri Feb 06 01:30:50 CST 2004

> Do you know if PADR and TRIM inside the select-statement are fully
> compatible with Rushmore?

When they are in the field list, it's no problem. Rushmore
rather cares for Where conditions, first of all.


hth
-Stefan

"Ch Lofberg" <ch.lofberg@telia.com> schrieb im Newsbeitrag
news:JXAUb.48059$mU6.185174@newsb.telia.net...
> Leonid, your suggestion solved the problem!
>
> 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.
>
> Do you know if PADR and TRIM inside the select-statement are fully
> compatible with Rushmore?
>
> The viewdefinition for vwRelsComp is now:
>
> 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) = UPPER(tblComp1.c1to234) ;
> JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) = 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) = UPPER(tblCont1.ct1_ct234) ;
> JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) =
UPPER(tblCont1.Ct1_ct234)
> ;
> WHERE ;
> &pcvwRelsFilter2 ;
> Group by keytorelintr ;
> ORDER BY 1
>
> Once again - thank you Leonid!
>
> Regards
> Christina
>
> "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
>
> select MyNumber+000000000.00 as MyNumber ...
>
> instead of
>
> select MyNumber ...
>
> and
>
> select Padr(MyString,20) as MyString ...
>
> instead of
>
> select alltrim(MyString) as MyString ...
>
> Then two rows of code that David posted will be enough and it will be
faster
>
> Leonid
>
>
>
> "Ch Löfberg" <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) = UPPER(tblComp1.c1to234) ;
> > JOIN tblAcComps ON UPPER(tblAcComps.AccToComp) = 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) = UPPER(tblCont1.ct1_ct234) ;
> > JOIN tblAcConts ON UPPER(tblAcConts.AccToCont1) =
> 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öfberg" <ch.lofberg@telia.com> wrote in message
> > > news:emLTb.47621$mU6.182795@newsb.telia.net...
> > >
> > > > Yes you are right - David´s 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´s 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 =
> ""
> > > > before closing. Thank you!
> > > >
> > > > Any help on the initial problem (VFP8´s divergent behavior )
> > > > would be even better than to solve the lost rightclick problem.
> > >
> > >
> >
> >
>
>


=?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