Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote view against Access questions
Message
From
19/10/2001 06:09:22
 
 
To
18/10/2001 14:17:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00570428
Message ID:
00570695
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform