Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of VFP INLIST with string of values
Message
De
27/11/2007 22:24:33
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01271536
Message ID:
01271641
Vues:
15
Hey Del

thankyouthankyouthankyou

I knew I had seen this code someplace in Goodwin's stuff when working with him on his app but couldn't remember the details. Jeff mentioned he thought we could adapt what you'd done in the VPC thingy but we couldn't find that place today either.

Now I think I remember how it all works.

Glad I asked here anyway, since got some very interesting ideas for Kevin and others.

I'll take a look at what you've got here and tomorrow I think Jeff and I will be on track again.



>Hey Charles:
>
>>In VFE I have the ability to using dynamic view parameters in remote views. Basically the framework will build SQL statements on the fly depending on the params passed with a great amount of control at the DBCX level for how the comparison will be done. I was looking for a TSQL syntax trick in the WHERE that would give me the equivalent to the inline function in VFP with INLIST where no other cursor is required.
>
>On the VFP side, I think you can create a view parameter behavior class and do something like the following in the GetSqlExpression() method - this code actual came from our friend Dan Goodwin...
>
>
>
>
>LPARAMETERS 	tlVFPSQL AS Boolean
>LOCAL lcvalue, lcreturn
>
>lcvalue=this.value
>lcreturn=""
>
>IF !EMPTY(lcvalue)
>	lcfield=ALLTRIM(this.oproperties.mcompareto)
>	IF !EMPTY(lcfield)
>		lcreturn=lcfield+" in ("+lcvalue+")"
>	endif	
>ENDIF
>
>RETURN lcreturn
>
>
>
>If you are working with Jeff, he should have this and related code in his i-layer. Check out iMover_dynamicvp of ivpMover.vcx which Dan helped me with while I was working at Blencowe. This is part of the code where we put a mover in a view parameter container to allow users to select multiple regions to select records with. The mover populates This.Value referenced above with a comma separated list.


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
Répondre
Fil
Voir

Click here to load this message in the networking platform