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