Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote view against Access questions
Message
De
19/10/2001 16:10:36
 
 
À
19/10/2001 06:09:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00570428
Message ID:
00571106
Vues:
27
Thanks, Daniel

Using IS NULL solved the problem with parameterizing against an empty Processed text field.

I used 1=2 AS lExclude to get an integer field. I'll try binding my checkbox to that.

Didn't understand this phrase in your answer, though

SELECT TRUE, FALSE, * FROM products WHERE discontinued=TRUE

Aren't TRUE and FALSE values and wouldn't you have to name them? Would this result in two fields named TRUE and FALSE (sorry, no sQL server on this machine to test it)

If I try this as part of my remote view I get an error that colum TRUE is not found


>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


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform