Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters (or whatever)
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01406446
Message ID:
01406653
Views:
58
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform