>SQLQueryInto( "select * from myTable where someField = ?", "crsResult", theParameterToSearchFor) >lnRowsMatchingSomeCriteria = SQLExecuteScalar("select count(*) from myTable where myField = ?", myParameter) >SQLInsert("MyTable", "field1, field2, field3m field4", 1, "Some char data", "Another one", DateTime()) >SQLNonQuery("Update myTable set myField=? where id=?", m.ValueToset, m.Id) >What do you mean below "at runtime it is replaced by a CA"? Is that additional code that fires when the form is instantiated to add an object to the DE?
>local lcSQL >text to m.lcSQL textmerge noshow >select *, > cast( > <SQL>case shippedOn is null then 'Pending' else 'Shipped' end</SQL> > <VFP>iif(isnul(shippedOn), 'Pending', 'Shipped')</VFP> > as varchar(10) ) as Status >from Customer cu >inner join Orders ord on cu.CustomerId = ord.CustomerId >where orderDate > ><SQL>dateadd(month, -1, getdate())</SQL> ><VFP>gomonth(DateTime(), -1)</VFP> >end text > >SQLQueryInto(m.lcSQL, 'crsResult') >On the below, the app is a mix of some SQL commands - for Selects, I always use them (well, mostly all - there are a few legacy lookups done another way but those are easily changed). I use some SQL Inserts - but then a lot is controlled by the framework as I use local views. Mike Yearwood would say that I can change all those views to something else...I will post to him soon.