Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters (or whatever)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01406446
Message ID:
01406653
Vues:
59
Larry,

It just takes 2 changes:
function BooksInZip( lcZipcode as string ) AS String

         WHERE zip = m.lcZipcode ;
since it's returning a value I prefer to declare them as functions rather than procedures.

>For learning purposes, I got my first (very simple) web service running and producing output (using the task pane test mode). Now, how do I go a little farther? For example, how do I use it? How do I pass it a parameter (zip code in this case)? Right now, this is the simple code that I have:
>
>DEFINE CLASS ShowBooks AS Session OLEPUBLIC
> PROCEDURE BooksInZip AS String
> LOCAL loXMLAdapter AS XMLAdapter
> LOCAL lcXMLBooks AS String
>
> loXMLAdapter = CREATEOBJECT("XMLAdapter")
>
> USE c:\clients\dda\pinpoint\source\ZipScope
> SELECT * ;
> FROM ZipScope ;
> WHERE zip = "30346" ;
> INTO CURSOR curBooks
>
> loXMLAdapter.AddTableSchema("curBooks")
> loXMLAdapter.UTF8Encoded = .T.
> loXMLAdapter.ToXML("lcXMLBooks")
>
> CLOSE DATABASES ALL
>
> RETURN lcXMLBooks
> ENDPROC
>ENDDEFINE
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform