Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jamie Osborn
  Where is Jamie Osborn?
 Melbourne
 Australia
 Jamie Osborn
 To: Jamie Osborn
  Where is Jamie Osborn?
 Melbourne
 Australia
 Jamie Osborn
 Tags
Subject: RE: Correction of Correction:)
Thread ID: 15876 Message ID: 15888 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, October 03, 2002 1:22:33 AM         
   


> > I've never need to create a view with an IIF() condition in it but I can't see why it wouldn't work.
> > If the view designer is giving you hassle then create the view in code :
> >
> > CREATE SQL VIEW AS MyView ;
> > SELECT Stocktrn.date, Invmaster.inv_name, Stocktrn.inv_no,;
> >    Stocktrn.total_amount, Stocktrn.paid_amt,;
> >    Stocktrn.total_amount-Stocktrn.paid_amt AS balance, Stocktrn.paid,;
> >    0.00 AS curr_amt, Stocktrn.trid;
> >   FROM  stock!invmaster INNER JOIN stock!stocktrn ;
> >     ON  Invmaster.id = Stocktrn.type;
> >   WHERE Stocktrn.paid <> .T.;
> >     AND Stocktrn.party = ?fintrn.party;
> >     AND Invmaster.type = iif(?gnAmount>0,2,1) 
> > 

> > Then you'll need to set the update field eg.
> >
> > DBSETPROP('MyView','View','SendUpdates',.T.) && Make the view update
> > DBSETPROP('MyView.id','Field','Keyfield',.T.) && Which field(s) are the keyfields ...
> >

Third time lucky ...... The first line of the code should be :
 CREATE SQL VIEW MyView AS 

(That's what happens to your memory as you get older !!!)

Cheers,
Jamie
jamie.osborn@foxite.com

ENTIRE THREAD

Updateable Cursor problem Posted by aktayal @ 10/2/2002 8:43:13 PM
RE: Updateable Cursor problem Posted by Jamie Osborn @ 10/3/2002 1:19:04 AM
Correction :) Posted by Jamie Osborn @ 10/3/2002 1:20:19 AM
RE: Correction of Correction:) Posted by Jamie Osborn @ 10/3/2002 1:22:33 AM
RE: Correction of Correction:) Posted by aktayal @ 10/4/2002 8:27:26 AM