crear y actualizar una vista por código??
Publicado por marco (79 intervenciones) el 27/08/2005 01:02:33
Hola hice una vista local con código lo que pasa es que la vista usa UNION la cual no es soportada desde la vista para modificar los parámetros, ya cree la vista pero tengo problemas con el código para actualizar, alguien que me explique yo puse esto y no me sirve:
DBSetProp(ThisView,"View","SendUpdates",.T.)
DBSetProp(ThisView,"View","BatchUpdateCount",1)
DBSetProp(ThisView,"View","CompareMemo",.T.)
DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
DBSetProp(ThisView,"View","FetchMemo",.T.)
DBSetProp(ThisView,"View","FetchSize",100)
DBSetProp(ThisView,"View","MaxRecords",-1)
DBSetProp(ThisView,"View","Prepared",.F.)
DBSetProp(ThisView,"View","UpdateType",1)
DBSetProp(ThisView,"View","UseMemoSize",255)
DBSetProp(ThisView,"View","Tables","datosdb!qsq1020,datosdb!qsq1021")
DBSetProp(ThisView,"View","WhereType",2)
& Usa dos tablas y se renombran los campos
DBSetProp(ThisView+".bultosactu","Field","DataType","N(10,2)")
DBSetProp(ThisView+".bultosactu","Field","UpdateName","datosdb!qsq1020.bultosactu")
DBSetProp(ThisView+".bultosactu","Field","KeyField",.T.)
DBSetProp(ThisView+".bultosactu","Field","Updatable",.T.)
DBSetProp(ThisView+".pesoactual_a","Field","DataType","N(10,2)")
DBSetProp(ThisView+".pesoactual_a","Field","UpdateName","datosdb!sq1020.pesoactual")
DBSetProp(ThisView+".pesoactual_a","Field","KeyField",.T.)
DBSetProp(ThisView+".pesoactual_a","Field","Updatable",.T.)
DBSetProp(ThisView+".bultosactual","Field","DataType","N(8,2)")
DBSetProp(ThisView+".bultosactual","Field","UpdateName","datosdb!sq1021.bultosactual")
DBSetProp(ThisView+".bultosactual","Field","KeyField",.T.)
DBSetProp(ThisView+".bultosactual","Field","Updatable",.T.)
DBSetProp(ThisView+".pesoactual_b","Field","DataType","N(8,2)")
DBSetProp(ThisView+".pesoactual_b","Field","UpdateName","datosdb!sq1021.pesoactual")
DBSetProp(ThisView+".pesoactual_b","Field","KeyField",.T.)
DBSetProp(ThisView+".pesoactual_b","Field","Updatable",.T.)
Gracias si alguien me ayuda...
DBSetProp(ThisView,"View","SendUpdates",.T.)
DBSetProp(ThisView,"View","BatchUpdateCount",1)
DBSetProp(ThisView,"View","CompareMemo",.T.)
DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
DBSetProp(ThisView,"View","FetchMemo",.T.)
DBSetProp(ThisView,"View","FetchSize",100)
DBSetProp(ThisView,"View","MaxRecords",-1)
DBSetProp(ThisView,"View","Prepared",.F.)
DBSetProp(ThisView,"View","UpdateType",1)
DBSetProp(ThisView,"View","UseMemoSize",255)
DBSetProp(ThisView,"View","Tables","datosdb!qsq1020,datosdb!qsq1021")
DBSetProp(ThisView,"View","WhereType",2)
& Usa dos tablas y se renombran los campos
DBSetProp(ThisView+".bultosactu","Field","DataType","N(10,2)")
DBSetProp(ThisView+".bultosactu","Field","UpdateName","datosdb!qsq1020.bultosactu")
DBSetProp(ThisView+".bultosactu","Field","KeyField",.T.)
DBSetProp(ThisView+".bultosactu","Field","Updatable",.T.)
DBSetProp(ThisView+".pesoactual_a","Field","DataType","N(10,2)")
DBSetProp(ThisView+".pesoactual_a","Field","UpdateName","datosdb!sq1020.pesoactual")
DBSetProp(ThisView+".pesoactual_a","Field","KeyField",.T.)
DBSetProp(ThisView+".pesoactual_a","Field","Updatable",.T.)
DBSetProp(ThisView+".bultosactual","Field","DataType","N(8,2)")
DBSetProp(ThisView+".bultosactual","Field","UpdateName","datosdb!sq1021.bultosactual")
DBSetProp(ThisView+".bultosactual","Field","KeyField",.T.)
DBSetProp(ThisView+".bultosactual","Field","Updatable",.T.)
DBSetProp(ThisView+".pesoactual_b","Field","DataType","N(8,2)")
DBSetProp(ThisView+".pesoactual_b","Field","UpdateName","datosdb!sq1021.pesoactual")
DBSetProp(ThisView+".pesoactual_b","Field","KeyField",.T.)
DBSetProp(ThisView+".pesoactual_b","Field","Updatable",.T.)
Gracias si alguien me ayuda...
Valora esta pregunta


0