Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change A View
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01297152
Message ID:
01297424
Vues:
28
Kevin,

It's not enough to generate CREATE SQL VIEW only. See gentable.prg, genview.prg File #9388

>Any reason why this wouldn't work?
>
>
>
>*****************************************************************
>* Make a change to a table for testing purposes
>*****************************************************************
>
>CLOSE DATABASES ALL
>OPEN DATABASE y:\vtc\data\vl_bill.dbc
>
>SELECT 0
>USE vl_Bill!CustMast EXCLUSIVE
>
>ALTER TABLE CustMast;
>	ADD COLUMN Test123 N(10)
>	
>
>
>*****************************************************************
>* Update the view.
>* I copied the SQL from the original view and appened it after
>* the CREATE SQL VIEW command
>*****************************************************************
>
>IF INDBC("v_custmast", "view")
>	DROP VIEW v_custmast
>ENDIF
>
>CREATE SQL VIEW v_CustMast AS;
>	SELECT Custmast.*, Fuelssh1.fsh_pk AS fsh_pk1,;
>	  Fuelssh1.fsh_code AS fsh_code1, Fuelssh2.fsh_pk AS fsh_pk2,;
>	  Fuelssh2.fsh_code AS fsh_code2, Fuelssh3.fsh_pk AS fsh_pk3,;
>	  Fuelssh3.fsh_code AS fsh_code3;
>	 FROM ;
>	     vl_bill!custmast ;
>	    LEFT OUTER JOIN vl_bill!fuelssh Fuelssh1 ;
>	   ON  Custmast.cmt_1fsh_fk = Fuelssh1.fsh_pk ;
>	    LEFT OUTER JOIN vl_bill!fuelssh Fuelssh2 ;
>	   ON  Custmast.cmt_2fsh_fk = Fuelssh2.fsh_pk ;
>	    LEFT OUTER JOIN vl_bill!fuelssh Fuelssh3 ;
>	   ON  Custmast.cmt_3fsh_fk = Fuelssh3.fsh_pk;
>	 WHERE  Custmast.cmt_pk = ( ?lnCMT_PK )
>
>RETURN
>
>
>I then compared the new view in the DBC against an older copy. All of the DBSETPROP() commands appear the same,
>with the exception of the
>
>
>DBSETPROP(ThisView,"View","SendUpdates",.T.)
>
>
>In the new view, it's set to False.
>
>1) Will this work?
>
>2) If so, how do I get the SendUpdates setting to set
>
>3) ANy other issues I'm missing?
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform