Charles,
I don't know how to add a logical field to a view. The following samples are against the northwind.mdb. In the WHERE clause you can use TRUE/FALSE as shown below. However, when using TRUE AS MyField or FALSE AS MyField2, then for some strange reason VFP doesn't convert this to a logical field. Rather TRUE is -1 and FALSE is 0. I guess in your case you could simply use 0 or 1 AS nFlag and bind your checkbox to this field.
SQLEXEC(nAccess, "SELECT TRUE, FALSE, * FROM products WHERE discontinued=TRUE")
In order to select empty field values you could use the following:
SQLEXEC(nAccess, "SELECT * FROM customers WHERE ISNULL(fax)")
With SQL Server, you could use
SQLEXEC(nSql, "SELECT * FROM customers WHERE fax IS NULL")
HTH
>I have a remote view against an Access table and am struggling with data type and syntax issues.
>
>1. If I wanted to add a logical field to a view against a vfp table I could say " .f. as lexclude " How would I do this when the view is coming from Access? I tried [NO] as lexclude but it won't eat that saying an expected parameter is not found etc. Note that this logical field which is just there so I can have a checkbox in my grid that displays the view which will be used in later processing - once the data comes from Access it has nothing to do with the back end. (no, i don't want to use a listbox activex control < g > )
>
>2. I have a character or 'text' field in the access table. I want to parameterize the view such that I will only get records where that field is empty. My registered parameter variable is vp_processed. I have tried ?vp_processed=" " and ?vp_processed=NULL and ?vp_processed=.NULL. to no good effect
>
>Guidance much appreciated (and for future reference if one could tell me if the same solutions would apply against SQL data that would be a bonus)
>
>TIA
Daniel