Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE myview NODATA... and VFP ask for parameters???
Message
De
07/01/2000 07:54:56
 
 
À
07/01/2000 06:54:08
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00313345
Message ID:
00314408
Vues:
60
Except if creating and maintaining your view are causing you all sorts of problems, as is the case here.

I'm not going to argue over what is the best way, because in the end, anything can come down to preference. I know my fair share about how to manage views, and I have found that straight SQL causes me less trouble than SQL views do.

>Right, but with a view all you need is a requery() and a grid.refresh()
>
>Sounds simpler to me
>
>Rex
>
>>There are a couple of ways around that- setting the grid's recordsource to "" before you rerun the query is one- another is to zap the cursor, and append in the new results from some temp results. Both will avoid losing the grids settings.
>>
>>>But don't you have problems when you recreate the SQL cursor with the column information?
>>>
>>>
>>>
>>>>You can use a cursor created by SQL as the recordsource for a grid- I do it all the time.
>>>>
>>>>>Erik,
>>>>>
>>>>>How about you want to use the view as a RecordSource for a Grid?
>>>>>
>>>>>Just a thought
>>>>>
>>>>>Rex
>>>>>
>>>>>>>Dear friends,
>>>>>>>
>>>>>>>I will try to answer to all...
>>>>>>>
>>>>>>>My code for the view is:
>>>>>>>
>>>>>>>select az.codArm, az.descricao, aaz.lote, Sum(aaz.quant) ;
>>>>>>> from tabAtAz aaz inner join tabAz az ;
>>>>>>> On az.stamp = aaz.st_tabAz Where aaz.st_tabAt = ?st_Artigo ;
>>>>>>> GROUP BY az.codArm, az.descricao, aaz.lote ORDER BY az.CodArm, aaz.lote
>>>>>>>
>>>>>>
>>>>>>I'm not sure wshat is causing the problem- I've never run into it because I have never tried to create a view with a GROUP BY clause. If your view does not need to be updatable, why not just use a plain ol' SQL query?
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform