Lisa,

External.a4d needs to be an Active4D page.

If you end up calling reusable Active4D code from this page then you might want to put that code in a library.
You can also write individual methods inside a page if you want.

Therefore you would have a file named external.a4d in your root 'web' folder.

That file would look something like this. Note I'm just typing this in so syntax is probably off.
<%
   /*
      file : external.a4d
      purpose: allows remote system to query my 4D database
usage : /external.a4d?qtype=foo&qval=bar
      This will perform the foo query with input 'bar'
   */

   ` if you had code in a library you would do this to import it
   import ("myLib");

   ` an example of an inline method
   `This method will be accessible to the rest of this page
   method "sayHello"
       write("Hello World")
   end method

   ` your input params
   $queryname := _request{"qtype"}
   $queryvalue := _request{"qval"}

   $vt_Output := ""; `will be set in query

   if ($queryname != ""  && $queryval != "")
      ` do stuff
   end if

   write ($vt_Output) `if you want to send this back to the requester

%>

best,

Brad

Lisa Werdal wrote:
Exactly, Brad.

But where would in _request{'qtype'} and in _request{'qval'} go? A4D doesn't like the ".a4d" in "Method "External" ($vt_QueryName; $vt_QueryParam)" call.

Thanks so much!!

Lisa


On Jun 1, 2007, at 2:53 PM, Brad Perkins wrote:

The query type will be in _request{'qtype'}
The value to query on will be in _request{'qval'}

----------------------------
Lisa Werdal
Taylor Technology
609-951-0005 x405
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/




_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to